@wenathlan/devthink 2.0.14 → 2.0.19
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 +60 -0
- package/{dist/bridge.d.ts → bridge.d.ts} +1 -1
- package/bridge.d.ts.map +1 -0
- package/bridge.js +1877 -0
- package/bun.d.ts.map +1 -0
- package/bun.js +52329 -0
- package/caps/background.json +712 -0
- package/caps/cli.json +360 -0
- package/caps/library.json +3611 -0
- package/caps/mcp.json +126 -0
- package/caps/pagebridge.json +377 -0
- package/caps/popup.json +51 -0
- package/caps/sidepanel.json +522 -0
- package/checksums.txt +142 -0
- package/cli.d.ts.map +1 -0
- package/{dist/cli.js → cli.js} +2 -2
- package/companion.d.ts.map +1 -0
- package/companion.js +389 -0
- package/crossbrowser.d.ts.map +1 -0
- package/crossbrowser.js +1191 -0
- package/dashdone.d.ts.map +1 -0
- package/dashdone.js +368 -0
- package/deno.d.ts.map +1 -0
- package/deno.js +52325 -0
- package/devthink.umd.js +52346 -0
- package/fixtures/bun.ts +7 -0
- package/fixtures/cjs.js +6 -0
- package/fixtures/deno.ts +6 -0
- package/fixtures/example-org-pagestate.json +22 -0
- package/fixtures/importers/automa-workflow.json +18 -0
- package/fixtures/importers/selenium-side.json +20 -0
- package/fixtures/importers/tabular-plan.csv +7 -0
- package/fixtures/importers/uivision-macro.json +10 -0
- package/fixtures/importers/v1-plan.json +13 -0
- package/fixtures/mcp-client.mjs +14 -0
- package/fixtures/pages/checkout.html +192 -0
- package/fixtures/pages/dashboard.html +110 -0
- package/fixtures/pages/feed.html +113 -0
- package/fixtures/pages/product-grid.html +150 -0
- package/fixtures/plans/form-inventory-plan.json +11 -0
- package/fixtures/plans/release-notes-plan.json +11 -0
- package/fixtures/recipes/agentscompete.json +11 -0
- package/fixtures/recipes/agentsforms.json +11 -0
- package/fixtures/recipes/agentsmonitor.json +11 -0
- package/fixtures/recipes/agentsreview.json +29 -0
- package/fixtures/recipes/agentswarm.json +11 -0
- package/fixtures/recipes/fillcalendar.json +12 -0
- package/fixtures/recipes/fillcheckout.json +13 -0
- package/fixtures/recipes/filldependentdropdowns.json +12 -0
- package/fixtures/recipes/fillfromcsv.json +13 -0
- package/fixtures/recipes/fillloginform.json +12 -0
- package/fixtures/recipes/fillmultistepwizard.json +13 -0
- package/fixtures/recipes/fillregistration.json +12 -0
- package/fixtures/recipes/fillsearchfilters.json +12 -0
- package/fixtures/recipes/filltypeahead.json +11 -0
- package/fixtures/recipes/monitoralerts.json +12 -0
- package/fixtures/recipes/monitoravailability.json +11 -0
- package/fixtures/recipes/monitornetworkquiet.json +12 -0
- package/fixtures/recipes/monitorpagechanges.json +11 -0
- package/fixtures/recipes/monitorpricechange.json +11 -0
- package/fixtures/recipes/monitorschedule.json +12 -0
- package/fixtures/recipes/scrapedynamicprices.json +13 -0
- package/fixtures/recipes/scrapeimagegallery.json +12 -0
- package/fixtures/recipes/scrapeinfinitefeed.json +13 -0
- package/fixtures/recipes/scrapenestedlists.json +12 -0
- package/fixtures/recipes/scrapeproductgrid.json +12 -0
- package/fixtures/recipes/scrapereviews.json +12 -0
- package/fixtures/recipes/scrapesearchresults.json +12 -0
- package/fixtures/recipes/scrapetablepagination.json +12 -0
- package/fixtures/recipes/testaccessibility.json +34 -0
- package/fixtures/recipes/testconsoleerrors.json +12 -0
- package/fixtures/recipes/testdeeplinks.json +12 -0
- package/fixtures/recipes/testformvalidation.json +13 -0
- package/fixtures/recipes/testlayoutshift.json +12 -0
- package/fixtures/recipes/testlinkcheck.json +12 -0
- package/fixtures/recipes/testloadtiming.json +12 -0
- package/fixtures/recipes/testvisualdiff.json +12 -0
- package/fixtures/workflows/changelog-digest-workflow.json +13 -0
- package/fixtures/workflows/form-survey-workflow.json +13 -0
- package/gallery.json +706 -0
- package/hardening.d.ts.map +1 -0
- package/hardening.js +188 -0
- package/headless.d.ts.map +1 -0
- package/headless.js +11522 -0
- package/http.d.ts.map +1 -0
- package/http.js +2165 -0
- package/index.cjs +54682 -0
- package/index.d.ts.map +1 -0
- package/index.js +52310 -0
- package/index.neutral.js +46343 -0
- package/{web/manifest.json → manifest.json} +1 -1
- package/mcp.d.ts.map +1 -0
- package/mcp.js +20515 -0
- package/memory.d.ts.map +1 -0
- package/{memory.ts → memory.js} +2310 -3834
- package/nativehost.template.json +10 -0
- package/node.cjs +54686 -0
- package/node.d.ts.map +1 -0
- package/pack.d.ts.map +1 -0
- package/pack.js +805 -0
- package/package.json +83 -176
- package/policy.d.ts.map +1 -0
- package/{policy.ts → policy.js} +4679 -5073
- package/progress.d.ts.map +1 -0
- package/progress.js +645 -0
- package/protocol.d.ts.map +1 -0
- package/protocol.js +8334 -0
- package/schemas/audit.schema.json +226 -0
- package/schemas/capability.schema.json +113 -0
- package/schemas/envelope.schema.json +162 -0
- package/schemas/memory.schema.json +51 -0
- package/schemas/observation.schema.json +113 -0
- package/schemas/plan.schema.json +208 -0
- package/schemas/progress.schema.json +126 -0
- package/schemas/proposal.schema.json +68 -0
- package/schemas/session.schema.json +82 -0
- package/schemas/tool.schema.json +94 -0
- package/server.d.ts.map +1 -0
- package/server.js +28877 -0
- package/umd-example.html +18 -0
- package/umd.d.ts.map +1 -0
- package/accounts.ts +0 -2087
- package/agent.ts +0 -2331
- package/antigravity.ts +0 -2139
- package/apifreeze.ts +0 -4146
- package/auth.ts +0 -642
- package/background.ts +0 -16837
- package/bridge.ts +0 -2080
- package/build.ts +0 -54
- package/bun.ts +0 -26
- package/capture.ts +0 -1614
- package/checksecrets.ts +0 -72
- package/cjs.ts +0 -9
- package/cli.ts +0 -3500
- package/commands.ts +0 -1101
- package/companion.ts +0 -450
- package/compatibility.ts +0 -37
- package/config.ts +0 -3137
- package/constants.ts +0 -943
- package/core.ts +0 -1473
- package/crossbrowser.ts +0 -1359
- package/dashdone.ts +0 -605
- package/data.ts +0 -943
- package/database.ts +0 -133
- package/debug.ts +0 -850
- package/deno.ts +0 -27
- package/devthink.ts +0 -707
- package/dist/accounts.d.ts +0 -409
- package/dist/agent.d.ts +0 -837
- package/dist/antigravity.d.ts +0 -380
- package/dist/apifreeze.d.ts +0 -113
- package/dist/auth.d.ts +0 -224
- package/dist/capture.d.ts +0 -595
- package/dist/cjs.d.ts +0 -6
- package/dist/commands.d.ts +0 -310
- package/dist/compatibility.d.ts +0 -17
- package/dist/config.d.ts +0 -1853
- package/dist/constants.d.ts +0 -637
- package/dist/core.d.ts +0 -361
- package/dist/data.d.ts +0 -330
- package/dist/database.d.ts +0 -24
- package/dist/debug.d.ts +0 -270
- package/dist/engine.d.ts +0 -74
- package/dist/environments.d.ts +0 -244
- package/dist/evidence.d.ts +0 -277
- package/dist/export.d.ts +0 -311
- package/dist/fingerprint.d.ts +0 -594
- package/dist/flow.d.ts +0 -300
- package/dist/gates.d.ts +0 -103
- package/dist/identity.d.ts +0 -51
- package/dist/ids.d.ts +0 -7
- package/dist/llm.d.ts +0 -652
- package/dist/models.d.ts +0 -1807
- package/dist/net.d.ts +0 -325
- package/dist/neutral.d.ts +0 -41
- package/dist/oauth.d.ts +0 -703
- package/dist/page.d.ts +0 -1166
- package/dist/perf.d.ts +0 -481
- package/dist/plan.d.ts +0 -134
- package/dist/project.d.ts +0 -395
- package/dist/providers.d.ts +0 -37
- package/dist/quota.d.ts +0 -453
- package/dist/recovery.d.ts +0 -621
- package/dist/request.d.ts +0 -1492
- package/dist/run.d.ts +0 -779
- package/dist/runtime.d.ts +0 -212
- package/dist/search.d.ts +0 -375
- package/dist/security.d.ts +0 -534
- package/dist/serve.d.ts +0 -136
- package/dist/session.d.ts +0 -296
- package/dist/storage.d.ts +0 -53
- package/dist/streaming.d.ts +0 -1119
- package/dist/swarm.d.ts +0 -328
- package/dist/tools.d.ts +0 -170
- package/dist/types.d.ts +0 -8357
- package/dist/utils.d.ts +0 -82
- package/dist/version.d.ts +0 -7
- package/dist/versionregistry.d.ts +0 -406
- package/dist/views.d.ts +0 -579
- package/dist/workbenchsession.d.ts +0 -69
- package/dist/workflow.d.ts +0 -649
- package/docs/readme.md +0 -92
- package/docs/schemas/antigravity.json +0 -192
- package/engine.ts +0 -1524
- package/environments.ts +0 -1005
- package/evidence.ts +0 -643
- package/export.ts +0 -889
- package/fingerprint.ts +0 -1458
- package/flow.ts +0 -1190
- package/gates.ts +0 -307
- package/gateway.ts +0 -34
- package/hardening.ts +0 -191
- package/headless.ts +0 -369
- package/http.ts +0 -2110
- package/identity.ts +0 -246
- package/ids.ts +0 -26
- package/index.ts +0 -369
- package/llm.ts +0 -2682
- package/mcp.ts +0 -1835
- package/models.ts +0 -3805
- package/modes.ts +0 -43
- package/net.ts +0 -1214
- package/neutral.ts +0 -362
- package/node.ts +0 -26
- package/oauth.ts +0 -2216
- package/offscreen.ts +0 -170
- package/pack.ts +0 -956
- package/page.ts +0 -7824
- package/pagebridge.ts +0 -1116
- package/perf.ts +0 -957
- package/plan.ts +0 -672
- package/plugin.ts +0 -76
- package/prisma.config.ts +0 -27
- package/progress.ts +0 -1308
- package/project.ts +0 -1291
- package/protocol.ts +0 -4187
- package/providers.ts +0 -246
- package/quota.ts +0 -1887
- package/recovery.ts +0 -2433
- package/request.ts +0 -4482
- package/run.ts +0 -2135
- package/runtime.ts +0 -526
- package/search.ts +0 -1760
- package/security.ts +0 -1673
- package/serve.ts +0 -419
- package/server.ts +0 -5538
- package/session.ts +0 -1162
- package/storage.ts +0 -182
- package/streaming.ts +0 -4101
- package/swarm.ts +0 -884
- package/sync.ts +0 -56
- package/tests/agentcert.test.ts +0 -128
- package/tests/agentfleet.test.ts +0 -214
- package/tests/agentreview.test.ts +0 -241
- package/tests/agentstream.test.ts +0 -335
- package/tests/agentwork.test.ts +0 -356
- package/tests/apifreeze.test.ts +0 -290
- package/tests/apimap.test.ts +0 -112
- package/tests/approvalgate.test.ts +0 -175
- package/tests/artifactmanifest.test.ts +0 -204
- package/tests/attentionfeed.test.ts +0 -163
- package/tests/backgroundruns.test.ts +0 -100
- package/tests/batchscheduling.test.ts +0 -131
- package/tests/blackboard.test.ts +0 -238
- package/tests/bridge.test.ts +0 -1088
- package/tests/browsercoverage.test.ts +0 -134
- package/tests/browserpolyfills.test.ts +0 -124
- package/tests/build.mjs +0 -1260
- package/tests/clientauth.test.ts +0 -223
- package/tests/clitools.test.ts +0 -578
- package/tests/confirmgates.test.ts +0 -190
- package/tests/containerpack.test.ts +0 -143
- package/tests/controlflow.test.ts +0 -2120
- package/tests/coordination.test.ts +0 -345
- package/tests/copyscreen.test.ts +0 -139
- package/tests/core.test.ts +0 -417
- package/tests/costcert.test.ts +0 -95
- package/tests/crossbrowser.test.ts +0 -115
- package/tests/cspaudit.test.ts +0 -79
- package/tests/dashdone.test.ts +0 -615
- package/tests/datagrid.test.ts +0 -137
- package/tests/doccheck.test.ts +0 -107
- package/tests/dombatch.test.ts +0 -109
- package/tests/emulation.test.ts +0 -282
- package/tests/environments.test.ts +0 -259
- package/tests/evidenceviews.test.ts +0 -88
- package/tests/exporttools.test.ts +0 -185
- package/tests/firefoxprep.test.ts +0 -134
- package/tests/flowlibrary.test.ts +0 -242
- package/tests/flowrun.test.ts +0 -303
- package/tests/forensics.test.ts +0 -439
- package/tests/gateway.test.ts +0 -939
- package/tests/headlesslib.test.ts +0 -171
- package/tests/httpstream.test.ts +0 -277
- package/tests/immutablelog.test.ts +0 -157
- package/tests/inboundguard.test.ts +0 -177
- package/tests/lazyload.test.ts +0 -72
- package/tests/librarymodes.test.ts +0 -623
- package/tests/llm.test.ts +0 -696
- package/tests/manifest.test.ts +0 -226
- package/tests/maskinputs.test.ts +0 -150
- package/tests/matrixverify.test.ts +0 -111
- package/tests/mavenpack.test.ts +0 -75
- package/tests/mcpserver.test.ts +0 -704
- package/tests/memory.test.ts +0 -4155
- package/tests/memorycare.test.ts +0 -230
- package/tests/migrateplan.test.ts +0 -349
- package/tests/minimization.test.ts +0 -414
- package/tests/modelroute.test.ts +0 -112
- package/tests/multiagent.test.ts +0 -440
- package/tests/nativebridge.test.ts +0 -807
- package/tests/navigation.test.ts +0 -284
- package/tests/nugetpack.test.ts +0 -83
- package/tests/orchestration.test.ts +0 -449
- package/tests/originpolicy.test.ts +0 -405
- package/tests/outputcompare.test.ts +0 -97
- package/tests/package.test.ts +0 -91
- package/tests/pagebridge.test.ts +0 -5909
- package/tests/pentest.test.ts +0 -75
- package/tests/perfrecords.test.ts +0 -257
- package/tests/permdiff.test.ts +0 -85
- package/tests/phishguard.test.ts +0 -128
- package/tests/pickerviews.test.ts +0 -155
- package/tests/pipelines.test.ts +0 -381
- package/tests/planlint.test.ts +0 -240
- package/tests/planreview.test.ts +0 -383
- package/tests/platformtargets.test.ts +0 -56
- package/tests/policy.test.ts +0 -8284
- package/tests/portability.test.ts +0 -96
- package/tests/progress.test.ts +0 -1036
- package/tests/promptlibrary.test.ts +0 -116
- package/tests/protocol.test.ts +0 -4793
- package/tests/publishingpipeline.test.ts +0 -314
- package/tests/quickactions.test.ts +0 -164
- package/tests/readiness.test.ts +0 -78
- package/tests/recipes.test.ts +0 -163
- package/tests/redactshots.test.ts +0 -216
- package/tests/registernvidiakeys.ts +0 -51
- package/tests/relayserve.test.ts +0 -304
- package/tests/releasenotes.test.ts +0 -276
- package/tests/resilience.test.ts +0 -467
- package/tests/resourceaware.test.ts +0 -187
- package/tests/runbudget.test.ts +0 -125
- package/tests/runhistory.test.ts +0 -299
- package/tests/runreplay.test.ts +0 -113
- package/tests/runresume.test.ts +0 -184
- package/tests/runstate.test.ts +0 -288
- package/tests/runtimeadapters.test.ts +0 -251
- package/tests/safariskeleton.test.ts +0 -115
- package/tests/sandboxframe.test.ts +0 -196
- package/tests/sbom.test.ts +0 -105
- package/tests/secretvault.test.ts +0 -188
- package/tests/selcache.test.ts +0 -111
- package/tests/sessioninterface.test.ts +0 -791
- package/tests/sessions.test.ts +0 -591
- package/tests/siteprefs.test.ts +0 -228
- package/tests/snapshotdelta.test.ts +0 -165
- package/tests/statusviews.test.ts +0 -237
- package/tests/stepmeter.test.ts +0 -200
- package/tests/streamparse.test.ts +0 -163
- package/tests/stylepruning.test.ts +0 -90
- package/tests/surfaces.test.ts +0 -282
- package/tests/sweep.test.ts +0 -78
- package/tests/syncbridge.test.ts +0 -164
- package/tests/taskqueue.test.ts +0 -206
- package/tests/toolcalls.test.ts +0 -336
- package/tests/toolcatalog.test.ts +0 -201
- package/tests/torture-agent.test.ts +0 -706
- package/tests/torture-auth.test.ts +0 -461
- package/tests/torture-commands.test.ts +0 -895
- package/tests/torture-data.test.ts +0 -923
- package/tests/torture-environments.test.ts +0 -285
- package/tests/torture-export.test.ts +0 -263
- package/tests/torture-http.test.ts +0 -1379
- package/tests/torture-llm.test.ts +0 -808
- package/tests/torture-memory.test.ts +0 -1084
- package/tests/torture-plan.test.ts +0 -829
- package/tests/torture-run.test.ts +0 -626
- package/tests/torture-session.test.ts +0 -928
- package/tests/torture-swarm.test.ts +0 -1245
- package/tests/torture-tools.test.ts +0 -964
- package/tests/torture-workflow.test.ts +0 -2354
- package/tests/tourviews.test.ts +0 -52
- package/tests/transparency.test.ts +0 -147
- package/tests/trigger.test.ts +0 -941
- package/tests/v1sunset.test.ts +0 -428
- package/tests/virtlist.test.ts +0 -94
- package/tests/vision.test.ts +0 -540
- package/tests/vsixpack.test.ts +0 -145
- package/tests/webapi.test.ts +0 -523
- package/tests/workflow.test.ts +0 -1785
- package/tests/workfloweditor.test.ts +0 -759
- package/tests/xpipack.test.ts +0 -128
- package/tools.ts +0 -734
- package/types.ts +0 -9908
- package/umd.ts +0 -9
- package/utils.ts +0 -249
- package/version.ts +0 -8
- package/versionregistry.ts +0 -1310
- package/views.ts +0 -2153
- package/vitest.config.ts +0 -12
- package/web/App.tsx +0 -78
- package/web/README.md +0 -47
- package/web/capacitor.config.ts +0 -46
- package/web/const.ts +0 -19
- package/web/control.shell.tsx +0 -66
- package/web/dashboardpage.ts +0 -554
- package/web/db.ts +0 -493
- package/web/design.html +0 -541
- package/web/gatewayview/Gateway.tsx +0 -345
- package/web/gatewayview/config.ts +0 -1042
- package/web/gatewayview/definition.ts +0 -174
- package/web/icons.ts +0 -15
- package/web/optionspage.ts +0 -691
- package/web/popup.ts +0 -1651
- package/web/schema.prisma +0 -176
- package/web/sidepanel.ts +0 -7941
- package/web/sitemanifest.json +0 -13
- package/web/terminal-ui.tsx +0 -622
- package/web/transparencypage.ts +0 -541
- package/web/vite.config.ts +0 -39
- package/web/workspace.ts +0 -23
- package/workbenchmemory.ts +0 -104
- package/workbenchsession.ts +0 -304
- package/workflow.ts +0 -4495
- /package/{dist/bun.d.ts → bun.d.ts} +0 -0
- /package/{dist/cli.d.ts → cli.d.ts} +0 -0
- /package/{dist/companion.d.ts → companion.d.ts} +0 -0
- /package/{dist/crossbrowser.d.ts → crossbrowser.d.ts} +0 -0
- /package/{dist/dashdone.d.ts → dashdone.d.ts} +0 -0
- /package/{dist/deno.d.ts → deno.d.ts} +0 -0
- /package/{dist/hardening.d.ts → hardening.d.ts} +0 -0
- /package/{dist/headless.d.ts → headless.d.ts} +0 -0
- /package/{dist/http.d.ts → http.d.ts} +0 -0
- /package/{dist/index.d.ts → index.d.ts} +0 -0
- /package/{dist/mcp.d.ts → mcp.d.ts} +0 -0
- /package/{dist/memory.d.ts → memory.d.ts} +0 -0
- /package/{dist/node.d.ts → node.d.ts} +0 -0
- /package/{dist/pack.d.ts → pack.d.ts} +0 -0
- /package/{dist/policy.d.ts → policy.d.ts} +0 -0
- /package/{dist/progress.d.ts → progress.d.ts} +0 -0
- /package/{dist/protocol.d.ts → protocol.d.ts} +0 -0
- /package/{dist/server.d.ts → server.d.ts} +0 -0
- /package/{dist/umd.d.ts → umd.d.ts} +0 -0
package/dist/engine.d.ts
DELETED
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* engine — universal gateway engine
|
|
3
|
-
* one file one responsibility — the generic request pipeline for all versions
|
|
4
|
-
* 0 to 100 correlated logics grouped in this one file
|
|
5
|
-
*
|
|
6
|
-
* consumes a gatewayconfig produces all 7 route handlers
|
|
7
|
-
* supports any llm any baseurl any api key via configuration
|
|
8
|
-
* v1 zai sdk v2 babel v3 nvidia v4 opencode kilo v5 openrouter are all
|
|
9
|
-
* just config objects feeding this single engine
|
|
10
|
-
*
|
|
11
|
-
* pipeline per request:
|
|
12
|
-
* 1 paused check → 503 fallback
|
|
13
|
-
* 2 model resolution — requested or default or meta rotation pick
|
|
14
|
-
* 3 auth resolution — 12 methods db env inline ephemeral
|
|
15
|
-
* 4 body building — sampling params per policy thinking param per config
|
|
16
|
-
* 5 execution — retry backoff rotation timeout circuit breaker
|
|
17
|
-
* 6 streaming — byte passthrough sse parsing heartbeat discard masking
|
|
18
|
-
* 7 persistence — savemsg with version specific fields
|
|
19
|
-
* 8 response building — chat completion anthropic message response formats
|
|
20
|
-
*/
|
|
21
|
-
import type { gatewayconfig, modeldef, sessionstate, thinkinglevel, versionhandlers } from "./types";
|
|
22
|
-
/** find a model by id in the catalog — returns undefined when unknown */
|
|
23
|
-
declare function findmodel(cfg: gatewayconfig, id: string): modeldef | undefined;
|
|
24
|
-
/** resolve the model for a request — meta rotation individual or default */
|
|
25
|
-
declare function resolvemodel(cfg: gatewayconfig, requested: string | undefined, session: sessionstate, globalcounter: {
|
|
26
|
-
n: number;
|
|
27
|
-
}): {
|
|
28
|
-
model: modeldef | undefined;
|
|
29
|
-
modelid: string;
|
|
30
|
-
display: string;
|
|
31
|
-
ismeta: boolean;
|
|
32
|
-
rotationindex: number;
|
|
33
|
-
};
|
|
34
|
-
/** compute the fusion context — sum of model contexts or explicit override */
|
|
35
|
-
declare function fusioncontext(cfg: gatewayconfig, modelsonly?: modeldef[]): number;
|
|
36
|
-
/** build the upstream request body per config policy
|
|
37
|
-
* model is optional: callers without a resolved model fall back to
|
|
38
|
-
* cfg.defaultmodel then the meta id for the model id mapping */
|
|
39
|
-
declare function buildbody(cfg: gatewayconfig, body: Record<string, unknown>, model?: modeldef, overridemodel?: string): Record<string, unknown>;
|
|
40
|
-
/** reconstruct message history from db when context restoresessionhistory */
|
|
41
|
-
declare function reconstructhistory(cfg: gatewayconfig, sessionid: string, incoming: unknown[]): Promise<unknown[]>;
|
|
42
|
-
/** truncate messages to fit the per-call context */
|
|
43
|
-
declare function fitcontext(cfg: gatewayconfig, messages: unknown[], model: modeldef | undefined): unknown[];
|
|
44
|
-
/** compute backoff with jitter */
|
|
45
|
-
declare function backoffms(cfg: gatewayconfig, attempt: number): number;
|
|
46
|
-
/** classify a status against the retry rotate fallback sets
|
|
47
|
-
* the rotate set only comes from an explicit rotation config: the old
|
|
48
|
-
* implicit default (any maxretries turned on rotate-on-529-404-410) stole
|
|
49
|
-
* 404 and 410 from the fallback classification a user configured
|
|
50
|
-
* explicitly — rotation is declared, never inferred from retry settings */
|
|
51
|
-
declare function classifystatus(cfg: gatewayconfig, status: number): "retry" | "rotate" | "fallback" | "fail";
|
|
52
|
-
/**
|
|
53
|
-
* createversion — the universal engine entry
|
|
54
|
-
* consumes one gatewayconfig produces all 7 route handlers
|
|
55
|
-
* every behavior is config driven — nothing hardcoded
|
|
56
|
-
*/
|
|
57
|
-
export declare function createversion(cfg: gatewayconfig): versionhandlers;
|
|
58
|
-
/** export internals for testing and advanced usage */
|
|
59
|
-
export declare const engineinternals: {
|
|
60
|
-
resolvemodel: typeof resolvemodel;
|
|
61
|
-
findmodel: typeof findmodel;
|
|
62
|
-
fusioncontext: typeof fusioncontext;
|
|
63
|
-
buildbody: typeof buildbody;
|
|
64
|
-
classifystatus: typeof classifystatus;
|
|
65
|
-
backoffms: typeof backoffms;
|
|
66
|
-
reconstructhistory: typeof reconstructhistory;
|
|
67
|
-
fitcontext: typeof fitcontext;
|
|
68
|
-
defaultbudgets: Record<thinkinglevel, number>;
|
|
69
|
-
defaultretrystatuses: number[];
|
|
70
|
-
defaultrotatestatuses: number[];
|
|
71
|
-
defaultfallbackstatuses: number[];
|
|
72
|
-
};
|
|
73
|
-
export {};
|
|
74
|
-
//# sourceMappingURL=engine.d.ts.map
|
package/dist/environments.d.ts
DELETED
|
@@ -1,244 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The environments module of the 1.1.90 consolidation: every correlated variation of the execution environment, emulation and sandbox rendering logic interned in this one file, so the module family carries one surface without duplicate variations.
|
|
3
|
-
* The correlation is the execution environment family: environments holds the base grammar (the per kind requirement table, the executor registry, the offscreen document lifecycle with its worker pool plan, the executor traffic envelopes and the isolated world injection of reviewed arguments); emulation stacks the device, network, location, agent and permission presets as revertible layers with the blackbox rules that hide the stack frames of the host page; and sandboxframe renders the untrusted markup of a reviewed step inside the sandboxed page with scripts, schemes and handlers stripped before render and the result posted back through a per render nonce.
|
|
4
|
-
* No pool size, preset, retention or posture is ever hardcoded: every interval, ceiling and grant stays the user's choice, and no environment ever bypasses the human review.
|
|
5
|
-
*/
|
|
6
|
-
import type { actionkind, environmentkind, environmentrequirement, offscreenregistryentry, toolstep, workerrequest, workerresponse } from "./types.js";
|
|
7
|
-
/** Reads the parse family of one offload eligible kind; a kind outside the families returns undefined. */
|
|
8
|
-
export declare function offfamilyof(kind: actionkind): string | undefined;
|
|
9
|
-
/** Reads the environments one action kind may run in: evaluate runs in the isolated world only, a step carrying untrusted markup renders inside the sandboxframe only, the parse heavy kinds may offload into the offscreen worker pool beside the live page and every other kind keeps the pagecontext of the page bridge. */
|
|
10
|
-
export declare function environmentsof(step: Pick<toolstep, "kind" | "options">): environmentkind[];
|
|
11
|
-
/** Reads the default environment of one step: the absent environment field routes to the isolated world for evaluate, the sandboxframe for untrusted markup and the pagecontext for everything else including the parse offload candidates until the user turns the offload on. */
|
|
12
|
-
export declare function defaultenvironment(step: Pick<toolstep, "kind" | "options">): environmentkind;
|
|
13
|
-
/** Lists the parse heavy kinds the offscreen worker pool may take over, grouped by their parse family. */
|
|
14
|
-
export declare function offloadkinds(): Array<{
|
|
15
|
-
task: string;
|
|
16
|
-
kinds: string[];
|
|
17
|
-
}>;
|
|
18
|
-
/** Reads whether one step carries untrusted markup for rendering: a reviewed options object with a markup string renders inside the sandboxframe only, so the untrusted markup never reenters the page dom. */
|
|
19
|
-
export declare function markuprenderstep(step: Pick<toolstep, "kind" | "options">): boolean;
|
|
20
|
-
/** Builds the per kind environment requirement table the policy exposes: one profile per action kind with its allowed environments and its default. */
|
|
21
|
-
export declare function environmentrequirementsof(kinds: actionkind[]): environmentrequirement[];
|
|
22
|
-
/** Maps every environmentkind to its runtime adapter: pagecontext rides the page bridge in the live page, isolatedworld rides the scripting api world page scripts cannot touch, offscreenworker rides the offscreen document worker pool and sandboxframe rides the sandboxed page with no extension privileges. */
|
|
23
|
-
export declare function executorregistry(): Array<{
|
|
24
|
-
environment: environmentkind;
|
|
25
|
-
adapter: string;
|
|
26
|
-
description: string;
|
|
27
|
-
}>;
|
|
28
|
-
/** Routes one step to its environment: the reviewed environment field wins when it sits inside the requirement table, the offload toggle moves parse heavy kinds into the offscreen worker pool, and a missing offscreen capability grant falls the step back to inline parsing inside the page instead of refusing the reviewed work. */
|
|
29
|
-
export declare function routeenvironment(step: toolstep, input: {
|
|
30
|
-
offload: boolean;
|
|
31
|
-
granted: boolean;
|
|
32
|
-
}): {
|
|
33
|
-
environment: environmentkind;
|
|
34
|
-
fallback: boolean;
|
|
35
|
-
reason: string;
|
|
36
|
-
};
|
|
37
|
-
/** Builds one executor traffic envelope for the offscreen worker pool: the parse family of the kind, the payload reference and the transferable keys the payload carries. */
|
|
38
|
-
export declare function workerrequestof(input: {
|
|
39
|
-
id: string;
|
|
40
|
-
runid: string;
|
|
41
|
-
stepid: string;
|
|
42
|
-
kind: actionkind;
|
|
43
|
-
payload: string;
|
|
44
|
-
options?: Record<string, unknown>;
|
|
45
|
-
sentat: number;
|
|
46
|
-
}): workerrequest;
|
|
47
|
-
/** Reads the payload keys the executor moves as transferable buffers where possible: every ArrayBuffer value travels as a transferable so the worker owns its bytes without a copy. */
|
|
48
|
-
export declare function transferablekeys(options: Record<string, unknown>): string[];
|
|
49
|
-
/** Builds one worker answer to the executor: the finished result or one streamed partial chunk with its sequence number. */
|
|
50
|
-
export declare function workerresponseof(input: {
|
|
51
|
-
id: string;
|
|
52
|
-
requestid: string;
|
|
53
|
-
ok: boolean;
|
|
54
|
-
result?: string;
|
|
55
|
-
partial?: number;
|
|
56
|
-
summary: string;
|
|
57
|
-
receivedat: number;
|
|
58
|
-
}): workerresponse;
|
|
59
|
-
/** Reads one worker answer: a partial chunk streams on while the final answer without a partial sequence completes the request, and a failed answer refuses without a result. */
|
|
60
|
-
export declare function acceptworkerresponse(response: workerresponse): {
|
|
61
|
-
done: boolean;
|
|
62
|
-
partial: boolean;
|
|
63
|
-
result?: string;
|
|
64
|
-
reason: string;
|
|
65
|
-
};
|
|
66
|
-
/** Plans the worker pool against the pending parse queue: the pool grows with the pending parses and shrinks with the idle workers, a user configured size pins the pool with no engine cap, and an absent size lets the queue alone decide. */
|
|
67
|
-
export declare function poolplan(input: {
|
|
68
|
-
pending: number;
|
|
69
|
-
current: number;
|
|
70
|
-
size?: number;
|
|
71
|
-
}): {
|
|
72
|
-
workers: number;
|
|
73
|
-
added: number;
|
|
74
|
-
retired: number;
|
|
75
|
-
reason: string;
|
|
76
|
-
};
|
|
77
|
-
/** Spawns the offscreen document of one run on first use and reuses the same document across the steps of the run: a registry entry already open for the run carries on while the first need records its reasons and justification. */
|
|
78
|
-
export declare function openoffscreen(input: {
|
|
79
|
-
registry: offscreenregistryentry[];
|
|
80
|
-
document: string;
|
|
81
|
-
runid: string;
|
|
82
|
-
reasons: string[];
|
|
83
|
-
justification: string;
|
|
84
|
-
now: number;
|
|
85
|
-
}): {
|
|
86
|
-
registry: offscreenregistryentry[];
|
|
87
|
-
entry: offscreenregistryentry;
|
|
88
|
-
reused: boolean;
|
|
89
|
-
};
|
|
90
|
-
/** Closes the offscreen document of one run when the run completes: the registry entry records its close time so the audit reads every spawn with its teardown. */
|
|
91
|
-
export declare function closeoffscreen(registry: offscreenregistryentry[], runid: string, now: number): {
|
|
92
|
-
registry: offscreenregistryentry[];
|
|
93
|
-
closed: boolean;
|
|
94
|
-
};
|
|
95
|
-
/** Builds the isolated world injection of one evaluate step: the scripting api injects the reviewed code inside the isolated world where page globals stay unreachable from step code, and the injection carries reviewed arguments only. */
|
|
96
|
-
export declare function isolatedinjection(step: toolstep): {
|
|
97
|
-
world: "ISOLATED";
|
|
98
|
-
code: string;
|
|
99
|
-
args: string[];
|
|
100
|
-
};
|
|
101
|
-
/** The runsummary task family of the 1.1.63 session interface: the distillation of a completed run runs as one offscreen worker task beside the parse families. */
|
|
102
|
-
export declare const runsummarytask = "runsummary";
|
|
103
|
-
/** Builds the offscreen worker request of one runsummary distillation: the task family name, the run and session provenance and the distilled payload reference; the step id slot carries the session id because the distillation belongs to the whole run. */
|
|
104
|
-
export declare function summaryrequestof(input: {
|
|
105
|
-
id: string;
|
|
106
|
-
runid: string;
|
|
107
|
-
sessionid: string;
|
|
108
|
-
payload: string;
|
|
109
|
-
sentat: number;
|
|
110
|
-
}): workerrequest;
|
|
111
|
-
import type { agentpreset, blackboxrule, devicepreset, emulationlayer, emulationstate, locationconsent, locationpreset, networkpreset, permissiongrant, permissionstate, presetlibrary, stackframe } from "./types.js";
|
|
112
|
-
/**
|
|
113
|
-
* Emulation layer engine for the 1.1.48 family.
|
|
114
|
-
* Every correlated rule for the reviewed masks of the run lives in this file: the preset normalizers of the user curated device, network, location and agent libraries, the reviewed revert plan grammar, the layer apply and revert math with prior state capture and reverse order restore, the stacking conflict order where the last applied layer wins, the latitude, longitude and user agent grammars, the browser permission set, the blackbox pattern matching that hides third party frames from stack traces, the retention expiry of reverted layer states and the versioned preset library import and export.
|
|
115
|
-
* True device metric, network condition, geolocation and user agent override needs browser debugger or platform permissions that the manifest gate forbids, so every layer applies page-injected overrides through the scripting api and shapes only the traffic the extension itself initiates; the derivation is recorded on every layer instead of hidden.
|
|
116
|
-
*/
|
|
117
|
-
/** The emulation kinds of the 1.1.48 family, listed among the available capabilities of every proposal request. */
|
|
118
|
-
export declare const emulationkinds: string[];
|
|
119
|
-
/** The reviewed browser permission set of the override grammar; overrides outside this set are refused. */
|
|
120
|
-
export declare const browserpermissions: string[];
|
|
121
|
-
/** The reviewed permission states of an override: granted, denied or the browser default prompt. */
|
|
122
|
-
export declare const permissionstates: permissionstate[];
|
|
123
|
-
/** The emulation family of one emulation action kind. */
|
|
124
|
-
export declare function familyofkind(kind: string): "device" | "network" | "location" | "agent" | "permission" | "blackbox" | undefined;
|
|
125
|
-
/** Normalizes one user curated device preset: the name, width, height, pixel ratio and the mobile flag with every bound a user choice only. */
|
|
126
|
-
export declare function devicepresetof(value: unknown): devicepreset | undefined;
|
|
127
|
-
/** Normalizes one user curated network preset: the name, latency, download and upload bounds and the offline flag. */
|
|
128
|
-
export declare function networkpresetof(value: unknown): networkpreset | undefined;
|
|
129
|
-
/** Normalizes one user curated location preset: the name, the latitude and longitude inside the reviewed ranges and the non-negative accuracy radius. */
|
|
130
|
-
export declare function locationpresetof(value: unknown): locationpreset | undefined;
|
|
131
|
-
/** Normalizes one user curated agent preset: the user agent string of the reviewed grammar, the platform and the non-empty brand list reported together. */
|
|
132
|
-
export declare function agentpresetof(value: unknown): agentpreset | undefined;
|
|
133
|
-
/** Normalizes one reviewed permission override: the name of the reviewed browser permission set, the state of the reviewed permission states and the run scope flag. */
|
|
134
|
-
export declare function permissiongrantof(value: unknown): permissiongrant | undefined;
|
|
135
|
-
/** Normalizes one reviewed blackbox rule: a non-empty url pattern list where every pattern names its origin explicitly and the trace scope of profiles, traces or both. */
|
|
136
|
-
export declare function blackboxruleof(value: unknown): blackboxrule | undefined;
|
|
137
|
-
/** Normalizes one reviewed revert plan: a non-empty ordered list of revert steps kept beside its layer; plans without steps are refused. */
|
|
138
|
-
export declare function revertplanof(value: unknown): string[] | undefined;
|
|
139
|
-
/** Builds one emulation layer record with its origin scope, apply time, captured prior state and reviewed revert plan. */
|
|
140
|
-
export declare function newlayer(input: {
|
|
141
|
-
id: string;
|
|
142
|
-
runid: string;
|
|
143
|
-
stepid: string;
|
|
144
|
-
family: emulationlayer["family"];
|
|
145
|
-
name: string;
|
|
146
|
-
originscope: string;
|
|
147
|
-
revertplan: string[];
|
|
148
|
-
prior?: Record<string, unknown>;
|
|
149
|
-
at: number;
|
|
150
|
-
}): emulationlayer;
|
|
151
|
-
/** Builds the initial emulation state of one run scoped to its tab and origin. */
|
|
152
|
-
export declare function emulationstateof(input: {
|
|
153
|
-
runid: string;
|
|
154
|
-
tabid: number;
|
|
155
|
-
origin: string;
|
|
156
|
-
now: number;
|
|
157
|
-
}): emulationstate;
|
|
158
|
-
/** Stacks one layer onto the emulation state in apply order: a second layer of the same family replaces the first in effect while both stay in the history, so the last applied layer wins conflicts. */
|
|
159
|
-
export declare function applylayer(state: emulationstate, layer: emulationlayer, at: number): emulationstate;
|
|
160
|
-
/** Reverts one layer of the state by its id: the revert time stamps the record while the layer history survives for review. */
|
|
161
|
-
export declare function revertlayer(state: emulationstate, layerid: string, at: number): emulationstate;
|
|
162
|
-
/** Reverts every active layer of the state in reverse apply order: the reversed list is the exact restore sequence and every layer keeps its revert stamp. */
|
|
163
|
-
export declare function revertalllayers(state: emulationstate, at: number): {
|
|
164
|
-
state: emulationstate;
|
|
165
|
-
reverted: emulationlayer[];
|
|
166
|
-
};
|
|
167
|
-
/** Returns the active layers of the state in apply order. */
|
|
168
|
-
export declare function activelayers(state: emulationstate | undefined): emulationlayer[];
|
|
169
|
-
/** Returns the names of the active layers for the response envelope and the review panel. */
|
|
170
|
-
export declare function layernames(state: emulationstate | undefined): string[];
|
|
171
|
-
/** Counts the active layers of one family so the panel can warn when layers stack on one tab. */
|
|
172
|
-
export declare function stackedcount(state: emulationstate | undefined): number;
|
|
173
|
-
/** True when the reviewed latitude stays inside the -90 to 90 degree range and the longitude inside the -180 to 180 degree range. */
|
|
174
|
-
export declare function locationrangevalid(latitude: number, longitude: number): boolean;
|
|
175
|
-
/** Validates one user agent string against the reviewed grammar: tokens of word characters, separators, slashes, spaces, numbers and version dots; the string must carry at least one token pair and refuse line breaks. */
|
|
176
|
-
export declare function agentgrammarvalid(useragent: string): boolean;
|
|
177
|
-
/** Grades one reviewed permission name by its power: location, camera, microphone and notification overrides carry the user's most sensitive signals and stay the highest grade. */
|
|
178
|
-
export declare function permissiongrade(name: string): "powerful" | "standard";
|
|
179
|
-
/** Matches one script url against a reviewed blackbox pattern of an explicit https origin with single star segments and double star subtrees. */
|
|
180
|
-
export declare function blackboxmatches(urlpattern: string, url: string): boolean;
|
|
181
|
-
/** Hides blackboxed frames from one stack trace: every frame whose url matches a rule pattern with a traces scope of traces or both is dropped so third party frames never enter the shaped trace. */
|
|
182
|
-
export declare function hideblackboxedframes(rules: blackboxrule[], frames: stackframe[]): stackframe[];
|
|
183
|
-
/** Marks one url as blackboxed when any rule with a profiles or both trace scope matches it, so the trace shaping lists the hidden third party urls. */
|
|
184
|
-
export declare function blackboxedurls(rules: blackboxrule[], urls: string[]): string[];
|
|
185
|
-
/** Expires the prior states of reverted layers after the retention window while the layer history itself always survives; an absent window keeps every prior state. */
|
|
186
|
-
export declare function expirelayers(state: emulationstate, retention: number | undefined, now: number): emulationstate;
|
|
187
|
-
/** Builds one shareable preset library file of the user curated presets; the version carries the library contract for imports through review. */
|
|
188
|
-
export declare function exportpresetlibrary(input: {
|
|
189
|
-
devices: devicepreset[];
|
|
190
|
-
networks: networkpreset[];
|
|
191
|
-
locations: locationpreset[];
|
|
192
|
-
agents: agentpreset[];
|
|
193
|
-
now: number;
|
|
194
|
-
}): presetlibrary;
|
|
195
|
-
/** Parses one reviewed preset library file: every preset entry must pass its normalizer and a file without any valid preset is refused; unknown fields stay ignored. */
|
|
196
|
-
export declare function importpresetlibrary(value: unknown): presetlibrary | undefined;
|
|
197
|
-
/** True when one approved location consent of that origin covers the reviewed coordinates; the prompt shows the exact latitude and longitude before the override applies. */
|
|
198
|
-
export declare function locationconsentcovers(origin: string, latitude: number, longitude: number, consents: locationconsent[]): boolean;
|
|
199
|
-
import type { environmentprovenance, sandboxrender, sandboxrenderresult } from "./types.js";
|
|
200
|
-
/**
|
|
201
|
-
* Sandbox frame logic of the 1.1.60 family.
|
|
202
|
-
* Correlated rules for untrusted markup live here: the render descriptor with its per render nonce, the stripping of scripts and event handlers before any render, the postmessage envelope the sandboxed page answers through, the nonce checked acceptance of every render result and the provenance each render records with its source origin.
|
|
203
|
-
* The sandboxed page carries no extension privileges: a render result never reenters the dom outside the frame, and the untrusted markup never touches the page the session granted.
|
|
204
|
-
*/
|
|
205
|
-
/** Strips every script and event handler from untrusted markup before render through one linear character scan, because a replace chain over reassembled payloads (`<scr<script>ipt>` or `javajavascript:script:`) reads as incomplete sanitization to static analysis even inside a convergence loop. The scan rebuilds the markup instead of removing fragments from it: a well formed tag keeps its name and its safe attributes with the script url schemes stripped from the values, every `on` event handler attribute drops, a script element drops with its whole content through the closing tag, and a malformed tag whose body carries another open angle (the reassembly payloads live on) drops entirely so no `<script` or `on...=` sequence ever survives into the sanitized output. */
|
|
206
|
-
export declare function stripscripts(markup: string): string;
|
|
207
|
-
/** Issues the per render nonce of one sandbox render: every message the sandboxed page answers carries the nonce of exactly one render so a stale or replayed message never passes. */
|
|
208
|
-
export declare function nonceof(seed: string): string;
|
|
209
|
-
/** Builds one sandbox render descriptor: the sanitized markup, the per render nonce and the source origin of the untrusted markup, ready for the sandboxed page that holds no extension privileges. */
|
|
210
|
-
export declare function sandboxrenderof(input: {
|
|
211
|
-
id: string;
|
|
212
|
-
markup: string;
|
|
213
|
-
sourceorigin: string;
|
|
214
|
-
stepid: string;
|
|
215
|
-
now: number;
|
|
216
|
-
}): sandboxrender;
|
|
217
|
-
/** Builds the postmessage envelope the executor posts into the sandboxed page: the render nonce and the sanitized markup travel together so the frame answers with the same nonce only. */
|
|
218
|
-
export declare function rendermessage(render: sandboxrender): {
|
|
219
|
-
channel: string;
|
|
220
|
-
type: string;
|
|
221
|
-
nonce: string;
|
|
222
|
-
markup: string;
|
|
223
|
-
};
|
|
224
|
-
/** Accepts one sandbox render result posted back through postmessage: the nonce must answer exactly one known unanswered render, an unknown, replayed or already answered nonce refuses, and the accepted result stays plain text that never reenters the dom outside the frame. The returned renders carry the answeredat marker of the accepted render so the caller threads the closed render out of its pending set. */
|
|
225
|
-
export declare function acceptrenderresult(input: {
|
|
226
|
-
renders: sandboxrender[];
|
|
227
|
-
message: {
|
|
228
|
-
channel?: string;
|
|
229
|
-
type?: string;
|
|
230
|
-
nonce?: string;
|
|
231
|
-
ok?: boolean;
|
|
232
|
-
text?: string;
|
|
233
|
-
summary?: string;
|
|
234
|
-
};
|
|
235
|
-
now: number;
|
|
236
|
-
}): {
|
|
237
|
-
accepted: boolean;
|
|
238
|
-
result?: sandboxrenderresult;
|
|
239
|
-
reason: string;
|
|
240
|
-
renders: sandboxrender[];
|
|
241
|
-
};
|
|
242
|
-
/** Reads the provenance of one sandbox render: the source origin, the step and the sandboxframe environment land beside the stored render so the audit reads where every untrusted markup came from. */
|
|
243
|
-
export declare function renderprovenance(render: sandboxrender): environmentprovenance;
|
|
244
|
-
//# sourceMappingURL=environments.d.ts.map
|
package/dist/evidence.d.ts
DELETED
|
@@ -1,277 +0,0 @@
|
|
|
1
|
-
/** The evidence module of the 1.1.90 consolidation: every correlated variation of the capture forensics and the run comparison logic interned in this one file, so the module family carries one surface without duplicate variations. */
|
|
2
|
-
import type { beforeafterpair, capturebundle, capturenamerule, consoletraceentry, diffbaserecord, diffresult, nettraceentry, outputcomparesession, provlogentry, runlogentry, timelapseconfig, timelapseframe, thumbnailrecord } from "./types.js";
|
|
3
|
-
/**
|
|
4
|
-
* Capture forensics logic of the 1.1.78 family.
|
|
5
|
-
* Every correlated rule for recording what a run changed lives in this one module: the beforeafter pairing that captures the page state around every action step, skips the pre capture for read only steps because a page a read never changed needs no before state, and links both captures to the stepid they wrap; the consoletimeline that collects the console entries in capture order, attaches the stepid active at each entry, preserves the run wide sequence numbers across page reloads and classifies errors, warnings and logs by level; the nettimeline that collects the request and response trace entries, attaches each entry to the step running at its timestamp and joins the request and response sides through the correlateids map of the run; the diffbase baseline that freezes one stored screenshot for one page state under the user configured threshold; the diffshot comparison that runs a new capture against its baseline through the pixel diff seam, computes the changed regions by pixel blocks, reports the similarity score and flags the visual regression only above the user threshold; the thumbshot sizing that keeps a configurable maximum edge; the timelapse that captures a changing page on the user interval, stops on the plan completion or the user stop and assembles its frames into an ordered sequence; the namecaptures naming that builds the lowercase file names from the plan, step and timestamp parts and keeps them unique per run with a counter; and the exportcaptures bundling that assembles the captures, the timelines, the diffs, the thumbnails and the lapse frames into one export payload with the provlog provenance of every capture, because a bundle without provenance never leaves the device.
|
|
6
|
-
* The module extends the reviewed families instead of duplicating them: the capture rectangle grammar rides the ocrregion shape the vision family already reads, the correlation joining composes the correlateids map the web api family of the 1.1.76 release already assigns, the console levels and sources reuse the loglevel and timelinesource grammars the run timeline family serves, and the naming carries the capturename grammar of the files family forward into the lowercase identifier rule.
|
|
7
|
-
* Every impure move stays behind an injected seam — the pixel diff and the capture grab resolve through functions the executor wires — while every threshold, interval, edge, retention and duration stays the user's with no code default: an absent value never hides a hardcoded ceiling, an absent diff threshold never flags a regression, an absent thumbnail edge never rescales a capture, and no forensic path ever bypasses a review.
|
|
8
|
-
*/
|
|
9
|
-
/** Pixel diff seam: one baseline image and one capture image with the reviewed block grid resolve to the image size and the per block changed pixel fractions in row major order; the extension executor wires the capture canvas pixel walk, tests wire plain fixtures. */
|
|
10
|
-
export type pixeldiff = (baseline: string, capture: string, grid: {
|
|
11
|
-
cols: number;
|
|
12
|
-
rows: number;
|
|
13
|
-
}) => Promise<{
|
|
14
|
-
width: number;
|
|
15
|
-
height: number;
|
|
16
|
-
blocks: number[];
|
|
17
|
-
}>;
|
|
18
|
-
/** Capture grab seam: one live tab resolves to the grabbed capture with its id, bytes, size and capture time; the extension executor wires the tab capture, tests wire plain fixtures. */
|
|
19
|
-
export type capturegrab = () => Promise<{
|
|
20
|
-
id: string;
|
|
21
|
-
bytes: string;
|
|
22
|
-
width: number;
|
|
23
|
-
height: number;
|
|
24
|
-
at: number;
|
|
25
|
-
}>;
|
|
26
|
-
/** The forensic kinds of the 1.1.78 family, listed among the available capabilities of every proposal request. */
|
|
27
|
-
export declare const forensickinds: string[];
|
|
28
|
-
/**
|
|
29
|
-
* Builds the beforeafter pair around one action step: a sensitive or interactive step captures the pre state and the post state, both linked to the stepid the pair wraps, while a read only step skips the pre capture because a page a read never changed needs no before state; the pair records the step kind and the heartbeat beat so the forensic view names what changed the page and which beat window the pair landed under.
|
|
30
|
-
*/
|
|
31
|
-
export declare function beforeafter(input: {
|
|
32
|
-
runid: string;
|
|
33
|
-
stepid: string;
|
|
34
|
-
stepkind: string;
|
|
35
|
-
risk: string;
|
|
36
|
-
pre?: {
|
|
37
|
-
id: string;
|
|
38
|
-
at: number;
|
|
39
|
-
};
|
|
40
|
-
post?: {
|
|
41
|
-
id: string;
|
|
42
|
-
at: number;
|
|
43
|
-
};
|
|
44
|
-
beat?: number;
|
|
45
|
-
now: number;
|
|
46
|
-
id?: string;
|
|
47
|
-
}): {
|
|
48
|
-
pair: beforeafterpair;
|
|
49
|
-
skipped?: "precapture" | "postcapture";
|
|
50
|
-
reason: string;
|
|
51
|
-
};
|
|
52
|
-
/**
|
|
53
|
-
* Collects the console entries of one run into the forensic timeline: the entries sort into capture order, each entry attaches the stepid active at its timestamp, the run wide sequence numbers climb across page reloads so a reload never resets the ordering, and the level classification keeps errors, warnings and logs apart by the loglevel grammar.
|
|
54
|
-
*/
|
|
55
|
-
export declare function consoletimeline(input: {
|
|
56
|
-
runid: string;
|
|
57
|
-
entries: Array<{
|
|
58
|
-
level?: string;
|
|
59
|
-
text: string;
|
|
60
|
-
source?: string;
|
|
61
|
-
at: number;
|
|
62
|
-
reload?: number;
|
|
63
|
-
}>;
|
|
64
|
-
steps: Array<{
|
|
65
|
-
id: string;
|
|
66
|
-
startedat: number;
|
|
67
|
-
endedat?: number;
|
|
68
|
-
}>;
|
|
69
|
-
beat?: number;
|
|
70
|
-
startsequence?: number;
|
|
71
|
-
now: number;
|
|
72
|
-
}): consoletraceentry[];
|
|
73
|
-
/**
|
|
74
|
-
* Collects the request and response trace entries of one run into the forensic net timeline: each entry attaches to the step running at its timestamp, the correlation map of the run joins the request and its response through the shared correlation id — the correlateids grammar of the 1.1.76 family — and a request without its pair stays unjoined so the gap names itself instead of inventing a status.
|
|
75
|
-
*/
|
|
76
|
-
export declare function nettimeline(input: {
|
|
77
|
-
runid: string;
|
|
78
|
-
entries: Array<{
|
|
79
|
-
url: string;
|
|
80
|
-
method: string;
|
|
81
|
-
status?: number;
|
|
82
|
-
at: number;
|
|
83
|
-
correlationid?: string;
|
|
84
|
-
requestid?: string;
|
|
85
|
-
}>;
|
|
86
|
-
steps: Array<{
|
|
87
|
-
id: string;
|
|
88
|
-
startedat: number;
|
|
89
|
-
endedat?: number;
|
|
90
|
-
}>;
|
|
91
|
-
correlations: Array<{
|
|
92
|
-
requestid: string;
|
|
93
|
-
correlationid: string;
|
|
94
|
-
responseid?: string;
|
|
95
|
-
status?: number;
|
|
96
|
-
}>;
|
|
97
|
-
beat?: number;
|
|
98
|
-
}): nettraceentry[];
|
|
99
|
-
/**
|
|
100
|
-
* Stores one diff baseline for a page state: the baseline freezes the stored capture under its page state label and the user configured similarity threshold; the threshold rides the user choice with no code default so an absent value never flags a regression on its own.
|
|
101
|
-
*/
|
|
102
|
-
export declare function diffbase(input: {
|
|
103
|
-
runid: string;
|
|
104
|
-
captureid: string;
|
|
105
|
-
pagestate: string;
|
|
106
|
-
threshold?: number;
|
|
107
|
-
beat?: number;
|
|
108
|
-
now: number;
|
|
109
|
-
id?: string;
|
|
110
|
-
}): diffbaserecord;
|
|
111
|
-
/**
|
|
112
|
-
* Compares one new capture against its diff baseline through the pixel diff seam: the seam walks the two images block by block over the reviewed grid, the changed blocks merge into region rectangles in css pixels, the similarity score reports the agreeing block fraction between zero and one, and the visual regression flag answers the user threshold alone — an absent threshold never flags because the bound stays the user's choice with no code default.
|
|
113
|
-
*/
|
|
114
|
-
export declare function diffshot(input: {
|
|
115
|
-
baseline: diffbaserecord;
|
|
116
|
-
capture: {
|
|
117
|
-
id: string;
|
|
118
|
-
bytes: string;
|
|
119
|
-
width: number;
|
|
120
|
-
height: number;
|
|
121
|
-
};
|
|
122
|
-
diff: pixeldiff;
|
|
123
|
-
blocks?: {
|
|
124
|
-
cols: number;
|
|
125
|
-
rows: number;
|
|
126
|
-
};
|
|
127
|
-
stepid?: string;
|
|
128
|
-
beat?: number;
|
|
129
|
-
now: number;
|
|
130
|
-
id?: string;
|
|
131
|
-
}): Promise<diffresult & {
|
|
132
|
-
summary: string;
|
|
133
|
-
}>;
|
|
134
|
-
/**
|
|
135
|
-
* Sizes one thumbnail for the capture log: the user configured maximum edge scales the capture while the aspect ratio holds, the longer edge lands exactly on the reviewed bound, and an absent edge keeps the thumbnail at its capture size because the bound never defaults in code.
|
|
136
|
-
*/
|
|
137
|
-
export declare function thumbshot(input: {
|
|
138
|
-
runid: string;
|
|
139
|
-
capture: {
|
|
140
|
-
id: string;
|
|
141
|
-
width: number;
|
|
142
|
-
height: number;
|
|
143
|
-
};
|
|
144
|
-
edge?: number;
|
|
145
|
-
now: number;
|
|
146
|
-
id?: string;
|
|
147
|
-
}): {
|
|
148
|
-
thumb: thumbnailrecord;
|
|
149
|
-
width: number;
|
|
150
|
-
height: number;
|
|
151
|
-
scale: number;
|
|
152
|
-
reason: string;
|
|
153
|
-
};
|
|
154
|
-
/**
|
|
155
|
-
* Plans one timelapse from the user reviewed interval and duration: the frames capture at startedat + k times the interval while they sit inside the duration, the lapse stops on the plan completion or the user stop — a stop before the end clamps the frame list — and every bound stays the user's with no code floor, so a missing interval leaves the lapse to the explicit user start.
|
|
156
|
-
*/
|
|
157
|
-
export declare function timelapse(input: {
|
|
158
|
-
runid: string;
|
|
159
|
-
interval: number;
|
|
160
|
-
duration: number;
|
|
161
|
-
startedat: number;
|
|
162
|
-
stoppedat?: number;
|
|
163
|
-
}): {
|
|
164
|
-
config: timelapseconfig;
|
|
165
|
-
frames: number;
|
|
166
|
-
stopsat: number;
|
|
167
|
-
reason: string;
|
|
168
|
-
};
|
|
169
|
-
/**
|
|
170
|
-
* Assembles the lapse frames into the ordered sequence the playback reads: the frames sort by their sequence numbers so a late stored frame lands in its place, and a duplicate sequence keeps the newest capture because one frame slot answers one capture.
|
|
171
|
-
*/
|
|
172
|
-
export declare function assemblelapse(frames: timelapseframe[]): timelapseframe[];
|
|
173
|
-
/**
|
|
174
|
-
* Builds the capture file names from the reviewed naming rule: the lowercase pattern stamps the {plan}, {step}, {timestamp} and {sequence} parts, every name folds into the lowercase identifier rule, and a name that already sits inside the run bumps its counter suffix so the names stay unique per run.
|
|
175
|
-
*/
|
|
176
|
-
export declare function namecaptures(input: {
|
|
177
|
-
rule: capturenamerule;
|
|
178
|
-
parts: Array<{
|
|
179
|
-
plan: string;
|
|
180
|
-
step: string;
|
|
181
|
-
timestamp: number;
|
|
182
|
-
sequence: number;
|
|
183
|
-
}>;
|
|
184
|
-
taken?: string[];
|
|
185
|
-
}): {
|
|
186
|
-
names: string[];
|
|
187
|
-
taken: string[];
|
|
188
|
-
reason: string;
|
|
189
|
-
};
|
|
190
|
-
/**
|
|
191
|
-
* Assembles the export bundle of the forensic surface: the captures, their beforeafter pairs, the console and net timeline counts, the diff results, the thumbnails and the lapse frames bundle under their capture names, and every capture must carry its provlog provenance entry — a payload without provenance entries refuses loudly because an export that cannot answer where its captures came from never leaves the device.
|
|
192
|
-
*/
|
|
193
|
-
export declare function exportcaptures(input: {
|
|
194
|
-
runid: string;
|
|
195
|
-
captures: string[];
|
|
196
|
-
pairs: string[];
|
|
197
|
-
consoleentries: number;
|
|
198
|
-
netentries: number;
|
|
199
|
-
diffs: string[];
|
|
200
|
-
thumbnails: string[];
|
|
201
|
-
lapses: string[];
|
|
202
|
-
names: Array<{
|
|
203
|
-
captureid: string;
|
|
204
|
-
name: string;
|
|
205
|
-
}>;
|
|
206
|
-
provlog: provlogentry[];
|
|
207
|
-
masked: boolean;
|
|
208
|
-
now: number;
|
|
209
|
-
id?: string;
|
|
210
|
-
}): capturebundle;
|
|
211
|
-
/**
|
|
212
|
-
* Outputcompare logic of the 1.1.66 family.
|
|
213
|
-
* Two competing runs stand beside each other here: the join pairs the runs on their step sequence, each pair grades its agreement, divergence and duration delta, the first divergent step highlights, and the metric set the session used records in the audit trail.
|
|
214
|
-
* The comparison never executes a step and never reads the page: it joins the stored runlog outcomes only, so an outputcompare session touches no browser state.
|
|
215
|
-
*/
|
|
216
|
-
/** Reads the task input signature of one run: the objective digest proxy over its step kinds and step count that two comparable runs must share. */
|
|
217
|
-
export declare function taskinputsignatureof(input: {
|
|
218
|
-
objective: string;
|
|
219
|
-
steps: string[];
|
|
220
|
-
}): string;
|
|
221
|
-
/** Reads the default metric set of one comparison session: agreement, divergence and the duration delta of every step pair. */
|
|
222
|
-
export declare function comparemetricdefaults(): string[];
|
|
223
|
-
/** Joins the runlogs of two runs on their step sequence: the pairs walk the shared step ids in order while a step only one run carries grades as onlyone. */
|
|
224
|
-
export declare function joinruns(logsa: runlogentry[], logsb: runlogentry[]): Array<{
|
|
225
|
-
stepid: string;
|
|
226
|
-
index: number;
|
|
227
|
-
a?: runlogentry;
|
|
228
|
-
b?: runlogentry;
|
|
229
|
-
}>;
|
|
230
|
-
/** Grades one joined step pair: the pair agrees when both runs completed the step with the same state, diverges when their states or summaries differ and onlyone marks a step one run lacks. */
|
|
231
|
-
export declare function stepcomparisonof(pair: {
|
|
232
|
-
stepid: string;
|
|
233
|
-
index: number;
|
|
234
|
-
a?: runlogentry;
|
|
235
|
-
b?: runlogentry;
|
|
236
|
-
}): {
|
|
237
|
-
stepid: string;
|
|
238
|
-
index: number;
|
|
239
|
-
agreement: "agree" | "diverge" | "onlyone";
|
|
240
|
-
summarya: string;
|
|
241
|
-
summaryb: string;
|
|
242
|
-
durationdelta: number;
|
|
243
|
-
};
|
|
244
|
-
/** Reads the first divergent step of one comparison; an absent index marks agreement across the whole sequence. */
|
|
245
|
-
export declare function firstdivergenceof(steps: Array<{
|
|
246
|
-
stepid: string;
|
|
247
|
-
index: number;
|
|
248
|
-
agreement: "agree" | "diverge" | "onlyone";
|
|
249
|
-
}>): number | undefined;
|
|
250
|
-
/** Builds one outputcompare session of two runs that share a task input signature: the join, the per step grades and the metric set the session used. */
|
|
251
|
-
export declare function outputcomparesessionof(input: {
|
|
252
|
-
runids: [string, string];
|
|
253
|
-
logsa: runlogentry[];
|
|
254
|
-
logsb: runlogentry[];
|
|
255
|
-
metrics?: string[];
|
|
256
|
-
now: number;
|
|
257
|
-
}): outputcomparesession;
|
|
258
|
-
/** Reads the metric summary of one comparison session for the audit trail: the metric set beside the agree, diverge and onlyone counts and the first divergence. */
|
|
259
|
-
export declare function comparesessionmetrics(session: outputcomparesession): {
|
|
260
|
-
metrics: string[];
|
|
261
|
-
agree: number;
|
|
262
|
-
diverge: number;
|
|
263
|
-
onlyone: number;
|
|
264
|
-
firstdivergence?: number;
|
|
265
|
-
reason: string;
|
|
266
|
-
};
|
|
267
|
-
/** Reads the side by side view of one comparison session: one row per joined step with both summaries and the duration delta beside the divergence highlight. */
|
|
268
|
-
export declare function outputcompareview(session: outputcomparesession): Array<{
|
|
269
|
-
stepid: string;
|
|
270
|
-
index: number;
|
|
271
|
-
agreement: string;
|
|
272
|
-
summarya: string;
|
|
273
|
-
summaryb: string;
|
|
274
|
-
durationdelta: number;
|
|
275
|
-
highlighted: boolean;
|
|
276
|
-
}>;
|
|
277
|
-
//# sourceMappingURL=evidence.d.ts.map
|