@wenathlan/devthink 2.0.13 → 2.0.15
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.
- package/CHANGELOG.md +27 -0
- package/accounts.ts +2087 -0
- package/agent.ts +2331 -0
- package/antigravity.ts +2139 -0
- package/apifreeze.ts +4146 -0
- package/auth.ts +642 -0
- package/background.ts +16837 -0
- package/bridge.ts +2080 -0
- package/build.ts +54 -0
- package/bun.ts +26 -0
- package/capture.ts +1614 -0
- package/checksecrets.ts +72 -0
- package/cjs.ts +9 -0
- package/cli.ts +3500 -0
- package/commands.ts +1101 -0
- package/companion.ts +450 -0
- package/compatibility.ts +37 -0
- package/config.ts +3137 -0
- package/constants.ts +943 -0
- package/core.ts +1473 -0
- package/crossbrowser.ts +1359 -0
- package/dashdone.ts +605 -0
- package/data.ts +943 -0
- package/database.ts +133 -0
- package/debug.ts +850 -0
- package/deno.ts +27 -0
- package/devthink.ts +707 -0
- package/dist/accounts.d.ts +409 -0
- package/dist/agent.d.ts +837 -0
- package/dist/antigravity.d.ts +380 -0
- package/dist/apifreeze.d.ts +113 -0
- package/dist/auth.d.ts +224 -0
- package/{bridge.d.ts → dist/bridge.d.ts} +1 -1
- package/dist/capture.d.ts +595 -0
- package/dist/cjs.d.ts +6 -0
- package/{cli.js → dist/cli.js} +2 -2
- package/dist/commands.d.ts +310 -0
- package/dist/compatibility.d.ts +17 -0
- package/dist/config.d.ts +1853 -0
- package/dist/constants.d.ts +637 -0
- package/dist/core.d.ts +361 -0
- package/dist/data.d.ts +330 -0
- package/dist/database.d.ts +24 -0
- package/dist/debug.d.ts +270 -0
- package/dist/engine.d.ts +74 -0
- package/dist/environments.d.ts +244 -0
- package/dist/evidence.d.ts +277 -0
- package/dist/export.d.ts +311 -0
- package/dist/fingerprint.d.ts +594 -0
- package/dist/flow.d.ts +300 -0
- package/dist/gates.d.ts +103 -0
- package/dist/identity.d.ts +51 -0
- package/dist/ids.d.ts +7 -0
- package/dist/llm.d.ts +652 -0
- package/dist/models.d.ts +1807 -0
- package/dist/net.d.ts +325 -0
- package/dist/neutral.d.ts +41 -0
- package/dist/oauth.d.ts +703 -0
- package/dist/page.d.ts +1166 -0
- package/dist/perf.d.ts +481 -0
- package/dist/plan.d.ts +134 -0
- package/dist/project.d.ts +395 -0
- package/dist/providers.d.ts +37 -0
- package/dist/quota.d.ts +453 -0
- package/dist/recovery.d.ts +621 -0
- package/dist/request.d.ts +1492 -0
- package/dist/run.d.ts +779 -0
- package/dist/runtime.d.ts +212 -0
- package/dist/search.d.ts +375 -0
- package/dist/security.d.ts +534 -0
- package/dist/serve.d.ts +136 -0
- package/dist/session.d.ts +296 -0
- package/dist/storage.d.ts +53 -0
- package/dist/streaming.d.ts +1119 -0
- package/dist/swarm.d.ts +328 -0
- package/dist/tools.d.ts +170 -0
- package/dist/types.d.ts +8357 -0
- package/dist/utils.d.ts +82 -0
- package/dist/version.d.ts +7 -0
- package/dist/versionregistry.d.ts +406 -0
- package/dist/views.d.ts +579 -0
- package/dist/workbenchsession.d.ts +69 -0
- package/dist/workflow.d.ts +649 -0
- package/docs/readme.md +92 -0
- package/docs/schemas/antigravity.json +192 -0
- package/engine.ts +1524 -0
- package/environments.ts +1005 -0
- package/evidence.ts +643 -0
- package/export.ts +889 -0
- package/fingerprint.ts +1458 -0
- package/flow.ts +1190 -0
- package/gates.ts +307 -0
- package/gateway.ts +34 -0
- package/hardening.ts +191 -0
- package/headless.ts +369 -0
- package/http.ts +2110 -0
- package/identity.ts +246 -0
- package/ids.ts +26 -0
- package/index.ts +369 -0
- package/llm.ts +2682 -0
- package/mcp.ts +1835 -0
- package/{memory.js → memory.ts} +3834 -2310
- package/models.ts +3805 -0
- package/modes.ts +43 -0
- package/net.ts +1214 -0
- package/neutral.ts +362 -0
- package/node.ts +26 -0
- package/oauth.ts +2216 -0
- package/offscreen.ts +170 -0
- package/pack.ts +956 -0
- package/package.json +175 -82
- package/page.ts +7824 -0
- package/pagebridge.ts +1116 -0
- package/perf.ts +957 -0
- package/plan.ts +672 -0
- package/plugin.ts +76 -0
- package/{policy.js → policy.ts} +5073 -4679
- package/prisma.config.ts +27 -0
- package/progress.ts +1308 -0
- package/project.ts +1291 -0
- package/protocol.ts +4187 -0
- package/providers.ts +246 -0
- package/quota.ts +1887 -0
- package/recovery.ts +2433 -0
- package/request.ts +4482 -0
- package/run.ts +2135 -0
- package/runtime.ts +526 -0
- package/search.ts +1760 -0
- package/security.ts +1673 -0
- package/serve.ts +419 -0
- package/server.ts +5538 -0
- package/session.ts +1162 -0
- package/storage.ts +182 -0
- package/streaming.ts +4101 -0
- package/swarm.ts +884 -0
- package/sync.ts +56 -0
- package/tests/agentcert.test.ts +128 -0
- package/tests/agentfleet.test.ts +214 -0
- package/tests/agentreview.test.ts +241 -0
- package/tests/agentstream.test.ts +335 -0
- package/tests/agentwork.test.ts +356 -0
- package/tests/apifreeze.test.ts +290 -0
- package/tests/apimap.test.ts +112 -0
- package/tests/approvalgate.test.ts +175 -0
- package/tests/artifactmanifest.test.ts +204 -0
- package/tests/attentionfeed.test.ts +163 -0
- package/tests/backgroundruns.test.ts +100 -0
- package/tests/batchscheduling.test.ts +131 -0
- package/tests/blackboard.test.ts +238 -0
- package/tests/bridge.test.ts +1088 -0
- package/tests/browsercoverage.test.ts +134 -0
- package/tests/browserpolyfills.test.ts +124 -0
- package/tests/build.mjs +1260 -0
- package/tests/clientauth.test.ts +223 -0
- package/tests/clitools.test.ts +578 -0
- package/tests/confirmgates.test.ts +190 -0
- package/tests/containerpack.test.ts +143 -0
- package/tests/controlflow.test.ts +2120 -0
- package/tests/coordination.test.ts +345 -0
- package/tests/copyscreen.test.ts +139 -0
- package/tests/core.test.ts +417 -0
- package/tests/costcert.test.ts +95 -0
- package/tests/crossbrowser.test.ts +115 -0
- package/tests/cspaudit.test.ts +79 -0
- package/tests/dashdone.test.ts +615 -0
- package/tests/datagrid.test.ts +137 -0
- package/tests/doccheck.test.ts +107 -0
- package/tests/dombatch.test.ts +109 -0
- package/tests/emulation.test.ts +282 -0
- package/tests/environments.test.ts +259 -0
- package/tests/evidenceviews.test.ts +88 -0
- package/tests/exporttools.test.ts +185 -0
- package/tests/firefoxprep.test.ts +134 -0
- package/tests/flowlibrary.test.ts +242 -0
- package/tests/flowrun.test.ts +303 -0
- package/tests/forensics.test.ts +439 -0
- package/tests/gateway.test.ts +939 -0
- package/tests/headlesslib.test.ts +171 -0
- package/tests/httpstream.test.ts +277 -0
- package/tests/immutablelog.test.ts +157 -0
- package/tests/inboundguard.test.ts +177 -0
- package/tests/lazyload.test.ts +72 -0
- package/tests/librarymodes.test.ts +623 -0
- package/tests/llm.test.ts +696 -0
- package/tests/manifest.test.ts +226 -0
- package/tests/maskinputs.test.ts +150 -0
- package/tests/matrixverify.test.ts +111 -0
- package/tests/mavenpack.test.ts +75 -0
- package/tests/mcpserver.test.ts +704 -0
- package/tests/memory.test.ts +4155 -0
- package/tests/memorycare.test.ts +230 -0
- package/tests/migrateplan.test.ts +349 -0
- package/tests/minimization.test.ts +414 -0
- package/tests/modelroute.test.ts +112 -0
- package/tests/multiagent.test.ts +440 -0
- package/tests/nativebridge.test.ts +807 -0
- package/tests/navigation.test.ts +284 -0
- package/tests/nugetpack.test.ts +83 -0
- package/tests/orchestration.test.ts +449 -0
- package/tests/originpolicy.test.ts +405 -0
- package/tests/outputcompare.test.ts +97 -0
- package/tests/package.test.ts +91 -0
- package/tests/pagebridge.test.ts +5909 -0
- package/tests/pentest.test.ts +75 -0
- package/tests/perfrecords.test.ts +257 -0
- package/tests/permdiff.test.ts +85 -0
- package/tests/phishguard.test.ts +128 -0
- package/tests/pickerviews.test.ts +155 -0
- package/tests/pipelines.test.ts +381 -0
- package/tests/planlint.test.ts +240 -0
- package/tests/planreview.test.ts +383 -0
- package/tests/platformtargets.test.ts +56 -0
- package/tests/policy.test.ts +8284 -0
- package/tests/portability.test.ts +96 -0
- package/tests/progress.test.ts +1036 -0
- package/tests/promptlibrary.test.ts +116 -0
- package/tests/protocol.test.ts +4793 -0
- package/tests/publishingpipeline.test.ts +314 -0
- package/tests/quickactions.test.ts +164 -0
- package/tests/readiness.test.ts +78 -0
- package/tests/recipes.test.ts +163 -0
- package/tests/redactshots.test.ts +216 -0
- package/tests/registernvidiakeys.ts +51 -0
- package/tests/relayserve.test.ts +304 -0
- package/tests/releasenotes.test.ts +276 -0
- package/tests/resilience.test.ts +467 -0
- package/tests/resourceaware.test.ts +187 -0
- package/tests/runbudget.test.ts +125 -0
- package/tests/runhistory.test.ts +299 -0
- package/tests/runreplay.test.ts +113 -0
- package/tests/runresume.test.ts +184 -0
- package/tests/runstate.test.ts +288 -0
- package/tests/runtimeadapters.test.ts +251 -0
- package/tests/safariskeleton.test.ts +115 -0
- package/tests/sandboxframe.test.ts +196 -0
- package/tests/sbom.test.ts +105 -0
- package/tests/secretvault.test.ts +188 -0
- package/tests/selcache.test.ts +111 -0
- package/tests/sessioninterface.test.ts +791 -0
- package/tests/sessions.test.ts +591 -0
- package/tests/siteprefs.test.ts +228 -0
- package/tests/snapshotdelta.test.ts +165 -0
- package/tests/statusviews.test.ts +237 -0
- package/tests/stepmeter.test.ts +200 -0
- package/tests/streamparse.test.ts +163 -0
- package/tests/stylepruning.test.ts +90 -0
- package/tests/surfaces.test.ts +282 -0
- package/tests/sweep.test.ts +78 -0
- package/tests/syncbridge.test.ts +164 -0
- package/tests/taskqueue.test.ts +206 -0
- package/tests/toolcalls.test.ts +336 -0
- package/tests/toolcatalog.test.ts +201 -0
- package/tests/torture-agent.test.ts +706 -0
- package/tests/torture-auth.test.ts +461 -0
- package/tests/torture-commands.test.ts +895 -0
- package/tests/torture-data.test.ts +923 -0
- package/tests/torture-environments.test.ts +285 -0
- package/tests/torture-export.test.ts +263 -0
- package/tests/torture-http.test.ts +1379 -0
- package/tests/torture-llm.test.ts +808 -0
- package/tests/torture-memory.test.ts +1084 -0
- package/tests/torture-plan.test.ts +829 -0
- package/tests/torture-run.test.ts +626 -0
- package/tests/torture-session.test.ts +928 -0
- package/tests/torture-swarm.test.ts +1245 -0
- package/tests/torture-tools.test.ts +964 -0
- package/tests/torture-workflow.test.ts +2354 -0
- package/tests/tourviews.test.ts +52 -0
- package/tests/transparency.test.ts +147 -0
- package/tests/trigger.test.ts +941 -0
- package/tests/v1sunset.test.ts +428 -0
- package/tests/virtlist.test.ts +94 -0
- package/tests/vision.test.ts +540 -0
- package/tests/vsixpack.test.ts +145 -0
- package/tests/webapi.test.ts +523 -0
- package/tests/workflow.test.ts +1785 -0
- package/tests/workfloweditor.test.ts +759 -0
- package/tests/xpipack.test.ts +128 -0
- package/tools.ts +734 -0
- package/types.ts +9908 -0
- package/umd.ts +9 -0
- package/utils.ts +249 -0
- package/version.ts +8 -0
- package/versionregistry.ts +1310 -0
- package/views.ts +2153 -0
- package/vitest.config.ts +12 -0
- package/web/App.tsx +78 -0
- package/web/README.md +47 -0
- package/web/capacitor.config.ts +46 -0
- package/web/const.ts +19 -0
- package/web/control.shell.tsx +66 -0
- package/web/dashboardpage.ts +554 -0
- package/web/db.ts +493 -0
- package/web/design.html +541 -0
- package/web/gatewayview/Gateway.tsx +345 -0
- package/web/gatewayview/config.ts +1042 -0
- package/web/gatewayview/definition.ts +174 -0
- package/web/icons.ts +15 -0
- package/{manifest.json → web/manifest.json} +1 -1
- package/web/optionspage.ts +691 -0
- package/web/popup.ts +1651 -0
- package/web/schema.prisma +176 -0
- package/web/sidepanel.ts +7941 -0
- package/web/sitemanifest.json +13 -0
- package/web/terminal-ui.tsx +622 -0
- package/web/transparencypage.ts +541 -0
- package/web/vite.config.ts +39 -0
- package/web/workspace.ts +23 -0
- package/workbenchmemory.ts +104 -0
- package/workbenchsession.ts +304 -0
- package/workflow.ts +4495 -0
- package/bridge.d.ts.map +0 -1
- package/bridge.js +0 -1877
- package/bun.d.ts.map +0 -1
- package/bun.js +0 -52329
- package/caps/background.json +0 -712
- package/caps/cli.json +0 -360
- package/caps/library.json +0 -3611
- package/caps/mcp.json +0 -126
- package/caps/pagebridge.json +0 -377
- package/caps/popup.json +0 -51
- package/caps/sidepanel.json +0 -522
- package/checksums.txt +0 -142
- package/cli.d.ts.map +0 -1
- package/companion.d.ts.map +0 -1
- package/companion.js +0 -389
- package/crossbrowser.d.ts.map +0 -1
- package/crossbrowser.js +0 -1191
- package/dashdone.d.ts.map +0 -1
- package/dashdone.js +0 -368
- package/deno.d.ts.map +0 -1
- package/deno.js +0 -52325
- package/devthink.umd.js +0 -52346
- package/fixtures/bun.ts +0 -7
- package/fixtures/cjs.js +0 -6
- package/fixtures/deno.ts +0 -6
- package/fixtures/example-org-pagestate.json +0 -22
- package/fixtures/importers/automa-workflow.json +0 -18
- package/fixtures/importers/selenium-side.json +0 -20
- package/fixtures/importers/tabular-plan.csv +0 -7
- package/fixtures/importers/uivision-macro.json +0 -10
- package/fixtures/importers/v1-plan.json +0 -13
- package/fixtures/mcp-client.mjs +0 -14
- package/fixtures/pages/checkout.html +0 -192
- package/fixtures/pages/dashboard.html +0 -110
- package/fixtures/pages/feed.html +0 -113
- package/fixtures/pages/product-grid.html +0 -150
- package/fixtures/plans/form-inventory-plan.json +0 -11
- package/fixtures/plans/release-notes-plan.json +0 -11
- package/fixtures/recipes/agentscompete.json +0 -11
- package/fixtures/recipes/agentsforms.json +0 -11
- package/fixtures/recipes/agentsmonitor.json +0 -11
- package/fixtures/recipes/agentsreview.json +0 -29
- package/fixtures/recipes/agentswarm.json +0 -11
- package/fixtures/recipes/fillcalendar.json +0 -12
- package/fixtures/recipes/fillcheckout.json +0 -13
- package/fixtures/recipes/filldependentdropdowns.json +0 -12
- package/fixtures/recipes/fillfromcsv.json +0 -13
- package/fixtures/recipes/fillloginform.json +0 -12
- package/fixtures/recipes/fillmultistepwizard.json +0 -13
- package/fixtures/recipes/fillregistration.json +0 -12
- package/fixtures/recipes/fillsearchfilters.json +0 -12
- package/fixtures/recipes/filltypeahead.json +0 -11
- package/fixtures/recipes/monitoralerts.json +0 -12
- package/fixtures/recipes/monitoravailability.json +0 -11
- package/fixtures/recipes/monitornetworkquiet.json +0 -12
- package/fixtures/recipes/monitorpagechanges.json +0 -11
- package/fixtures/recipes/monitorpricechange.json +0 -11
- package/fixtures/recipes/monitorschedule.json +0 -12
- package/fixtures/recipes/scrapedynamicprices.json +0 -13
- package/fixtures/recipes/scrapeimagegallery.json +0 -12
- package/fixtures/recipes/scrapeinfinitefeed.json +0 -13
- package/fixtures/recipes/scrapenestedlists.json +0 -12
- package/fixtures/recipes/scrapeproductgrid.json +0 -12
- package/fixtures/recipes/scrapereviews.json +0 -12
- package/fixtures/recipes/scrapesearchresults.json +0 -12
- package/fixtures/recipes/scrapetablepagination.json +0 -12
- package/fixtures/recipes/testaccessibility.json +0 -34
- package/fixtures/recipes/testconsoleerrors.json +0 -12
- package/fixtures/recipes/testdeeplinks.json +0 -12
- package/fixtures/recipes/testformvalidation.json +0 -13
- package/fixtures/recipes/testlayoutshift.json +0 -12
- package/fixtures/recipes/testlinkcheck.json +0 -12
- package/fixtures/recipes/testloadtiming.json +0 -12
- package/fixtures/recipes/testvisualdiff.json +0 -12
- package/fixtures/workflows/changelog-digest-workflow.json +0 -13
- package/fixtures/workflows/form-survey-workflow.json +0 -13
- package/gallery.json +0 -706
- package/hardening.d.ts.map +0 -1
- package/hardening.js +0 -188
- package/headless.d.ts.map +0 -1
- package/headless.js +0 -11522
- package/http.d.ts.map +0 -1
- package/http.js +0 -2165
- package/index.cjs +0 -54682
- package/index.d.ts.map +0 -1
- package/index.js +0 -52310
- package/index.neutral.js +0 -46343
- package/mcp.d.ts.map +0 -1
- package/mcp.js +0 -20515
- package/memory.d.ts.map +0 -1
- package/nativehost.template.json +0 -10
- package/node.cjs +0 -54686
- package/node.d.ts.map +0 -1
- package/pack.d.ts.map +0 -1
- package/pack.js +0 -805
- package/policy.d.ts.map +0 -1
- package/progress.d.ts.map +0 -1
- package/progress.js +0 -645
- package/protocol.d.ts.map +0 -1
- package/protocol.js +0 -8334
- package/schemas/audit.schema.json +0 -226
- package/schemas/capability.schema.json +0 -113
- package/schemas/envelope.schema.json +0 -162
- package/schemas/memory.schema.json +0 -51
- package/schemas/observation.schema.json +0 -113
- package/schemas/plan.schema.json +0 -208
- package/schemas/progress.schema.json +0 -126
- package/schemas/proposal.schema.json +0 -68
- package/schemas/session.schema.json +0 -82
- package/schemas/tool.schema.json +0 -94
- package/server.d.ts.map +0 -1
- package/server.js +0 -28877
- package/umd-example.html +0 -18
- package/umd.d.ts.map +0 -1
- /package/{bun.d.ts → dist/bun.d.ts} +0 -0
- /package/{cli.d.ts → dist/cli.d.ts} +0 -0
- /package/{companion.d.ts → dist/companion.d.ts} +0 -0
- /package/{crossbrowser.d.ts → dist/crossbrowser.d.ts} +0 -0
- /package/{dashdone.d.ts → dist/dashdone.d.ts} +0 -0
- /package/{deno.d.ts → dist/deno.d.ts} +0 -0
- /package/{hardening.d.ts → dist/hardening.d.ts} +0 -0
- /package/{headless.d.ts → dist/headless.d.ts} +0 -0
- /package/{http.d.ts → dist/http.d.ts} +0 -0
- /package/{index.d.ts → dist/index.d.ts} +0 -0
- /package/{mcp.d.ts → dist/mcp.d.ts} +0 -0
- /package/{memory.d.ts → dist/memory.d.ts} +0 -0
- /package/{node.d.ts → dist/node.d.ts} +0 -0
- /package/{pack.d.ts → dist/pack.d.ts} +0 -0
- /package/{policy.d.ts → dist/policy.d.ts} +0 -0
- /package/{progress.d.ts → dist/progress.d.ts} +0 -0
- /package/{protocol.d.ts → dist/protocol.d.ts} +0 -0
- /package/{server.d.ts → dist/server.d.ts} +0 -0
- /package/{umd.d.ts → dist/umd.d.ts} +0 -0
|
@@ -0,0 +1,595 @@
|
|
|
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
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
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
|
package/{cli.js → dist/cli.js}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
/*! devthink 2.0.
|
|
2
|
+
/*! devthink 2.0.15 — consent-first browser agent library — GPL-3.0-only — https://github.com/wenathlan/devthink */
|
|
3
3
|
|
|
4
4
|
// cli.ts
|
|
5
5
|
import { createInterface } from "node:readline/promises";
|
|
@@ -569,7 +569,7 @@ function endcall(input) {
|
|
|
569
569
|
}
|
|
570
570
|
|
|
571
571
|
// version.ts
|
|
572
|
-
var packageversion = "2.0.
|
|
572
|
+
var packageversion = "2.0.15";
|
|
573
573
|
var protocolmajor = 2;
|
|
574
574
|
var protocolfloormajor = 2;
|
|
575
575
|
|