@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/perf.d.ts
DELETED
|
@@ -1,481 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The perf module of the 1.1.90 consolidation: every correlated variation of the hot path measurement and bounding logic interned in this one file, so the module family carries one surface without duplicate variations.
|
|
3
|
-
* The correlation is the hot path family: perfrecords holds the perf record stream every meter writes into (the worker backpressure, the queue depth samples, the snapshot request dedupe, the capture plan schedule and the pruning of the record window); snapshotdelta fingerprints the snapshot regions so unchanged ones skip recomputation; dombatch coalesces the dom bursts into debounced batches with their query plans; stepmeter measures the steps (the durationmeter that writes its samples into the perf records, the selectorprofile with its failure rates, the steptrace spans, the startupmeter of the cold start and the slowmo replay); resourceaware bounds the same hot paths against the device (the tab suspend plan, the artifact compression, the log pruning and the battery aware network backoff); batchscheduling paces the queues with the domain lanes, the polite delay, the adaptive poll and the request coalescing under backpressure; and lazyload keeps the heavy modules out of the first paint path inside the user startup budget.
|
|
4
|
-
* No window, budget, factor or threshold is ever hardcoded: every bound stays the user's choice with no engine cap, and the meters measure and never refuse.
|
|
5
|
-
*/
|
|
6
|
-
import type { perfrecord, queuedepthsample, incrsnapshotdelta, snapshotchange, batchqueryplan, debouncedbatch, debounceprofile, durationsample, selectorstats, slowmosession, startupsample, steptracespan, artifactcompressrecord, batteryawarestate, logprunerule, networkretryrule, tabsuspendstate, adaptivepollwindow, backpressuresignal, cadencecontrol, coalescedrequest, domainlane, lazyloadrecord, lazymoddescriptor, startupbudget } from "./types.js";
|
|
7
|
-
/**
|
|
8
|
-
* Perfrecords logic of the 1.1.68 family.
|
|
9
|
-
* Every step records its perf data beside its outcome: the duration, the query count, the cache hits and the delta flag with the provenance attached, the worker queue gains backpressure that defers parse tasks past the user configured depth instead of refusing them, the queue depth records over time for tuning, and the run summary charts the step durations.
|
|
10
|
-
* No budget ever refuses work: the deferral, the priority and the depth stay the user's choices, and the records stay advisory instruments of measurement.
|
|
11
|
-
*/
|
|
12
|
-
/** Records one perf record of an executed step: the duration, the query count and the cache hits the step cost beside the delta flag and the provenance every record attaches. */
|
|
13
|
-
export declare function perfrecordof(input: {
|
|
14
|
-
runid: string;
|
|
15
|
-
stepid: string;
|
|
16
|
-
duration: number;
|
|
17
|
-
queries: number;
|
|
18
|
-
cachehits: number;
|
|
19
|
-
delta: boolean;
|
|
20
|
-
now: number;
|
|
21
|
-
provenance?: {
|
|
22
|
-
origin?: string;
|
|
23
|
-
environment?: string;
|
|
24
|
-
task?: string;
|
|
25
|
-
};
|
|
26
|
-
}): perfrecord;
|
|
27
|
-
/** Reads the backpressure verdict of one worker queue: parse tasks past the user configured depth defer and never refuse, and an absent depth keeps the queue unbounded. */
|
|
28
|
-
export declare function workerbackpressure(input: {
|
|
29
|
-
depth: number;
|
|
30
|
-
pending: number;
|
|
31
|
-
configured?: number;
|
|
32
|
-
}): {
|
|
33
|
-
deferred: number;
|
|
34
|
-
admitted: number;
|
|
35
|
-
unbounded: boolean;
|
|
36
|
-
};
|
|
37
|
-
/** Builds one worker queue depth sample for the tuning record: the pending parse count and the deferred count the backpressure held at one moment. */
|
|
38
|
-
export declare function queuedepthsampleof(input: {
|
|
39
|
-
depth: number;
|
|
40
|
-
deferred: number;
|
|
41
|
-
now: number;
|
|
42
|
-
}): queuedepthsample;
|
|
43
|
-
/** Reads the tuning view of the recorded queue depth samples: the peak depth, the deferred total and the span the samples cover. */
|
|
44
|
-
export declare function queuedepthview(samples: queuedepthsample[]): {
|
|
45
|
-
peak: number;
|
|
46
|
-
deferred: number;
|
|
47
|
-
samples: number;
|
|
48
|
-
};
|
|
49
|
-
/** Builds the snapshot request key of one run so the executor deduplicates identical snapshot requests within the run: the same run, base ref and fingerprint answer from the same recomputation. */
|
|
50
|
-
export declare function snapshotrequestkey(input: {
|
|
51
|
-
runid: string;
|
|
52
|
-
stepid: string;
|
|
53
|
-
fingerprint: string;
|
|
54
|
-
}): string;
|
|
55
|
-
/** Deduplicates identical snapshot requests within one run: the first request computes and the repeats answer from the first result while the executor records the hit count. */
|
|
56
|
-
export declare function dedupesnapshotrequests(input: {
|
|
57
|
-
runid: string;
|
|
58
|
-
requests: Array<{
|
|
59
|
-
stepid: string;
|
|
60
|
-
fingerprint: string;
|
|
61
|
-
}>;
|
|
62
|
-
}): {
|
|
63
|
-
distinct: Array<{
|
|
64
|
-
stepid: string;
|
|
65
|
-
fingerprint: string;
|
|
66
|
-
}>;
|
|
67
|
-
duplicates: number;
|
|
68
|
-
};
|
|
69
|
-
/** Reads the capture schedule behind the user priority choice: speed defers the heavy capture work to the run end while evidence keeps every capture beside its step; the choice optimizes the order and never drops a capture. */
|
|
70
|
-
export declare function captureplanschedule(input: {
|
|
71
|
-
priority?: "speed" | "evidence";
|
|
72
|
-
heavy: string[];
|
|
73
|
-
}): {
|
|
74
|
-
beside: string[];
|
|
75
|
-
deferred: string[];
|
|
76
|
-
note: string;
|
|
77
|
-
};
|
|
78
|
-
/** Reads the abandoned parse task ids of one halted run so the executor cancels them: a task belongs to the halted run and never started inside the worker pool. */
|
|
79
|
-
export declare function abandonedparsetasks(input: {
|
|
80
|
-
halted: boolean;
|
|
81
|
-
runid: string;
|
|
82
|
-
pending: Array<{
|
|
83
|
-
id: string;
|
|
84
|
-
runid: string;
|
|
85
|
-
started: boolean;
|
|
86
|
-
}>;
|
|
87
|
-
}): {
|
|
88
|
-
cancelled: string[];
|
|
89
|
-
kept: string[];
|
|
90
|
-
};
|
|
91
|
-
/** Builds the perf summary of one recent run the dashboardpage renders: the step count, the total and average duration, the query count and the cache hit ratio beside the delta share. */
|
|
92
|
-
export declare function perfsummary(records: perfrecord[]): {
|
|
93
|
-
steps: number;
|
|
94
|
-
duration: number;
|
|
95
|
-
average: number;
|
|
96
|
-
queries: number;
|
|
97
|
-
cachehits: number;
|
|
98
|
-
hitratio: number;
|
|
99
|
-
deltashare: number;
|
|
100
|
-
};
|
|
101
|
-
/** Charts the step durations of one run over its steps: one point per step in execution order with the step id, the duration and the environment provenance. */
|
|
102
|
-
export declare function stepdurationchart(records: perfrecord[]): Array<{
|
|
103
|
-
stepid: string;
|
|
104
|
-
duration: number;
|
|
105
|
-
delta: boolean;
|
|
106
|
-
}>;
|
|
107
|
-
/** Builds the perf audit bundle of one run: every record with its provenance beside the summary, exported as one bundle the user reads. */
|
|
108
|
-
export declare function perfbundle(input: {
|
|
109
|
-
runid: string;
|
|
110
|
-
records: perfrecord[];
|
|
111
|
-
}): {
|
|
112
|
-
runid: string;
|
|
113
|
-
summary: ReturnType<typeof perfsummary>;
|
|
114
|
-
records: perfrecord[];
|
|
115
|
-
};
|
|
116
|
-
/** Prunes the perf records past the user configured retention window; an absent window keeps every record while the audit bundle always rebuilds from the survivors. */
|
|
117
|
-
export declare function pruneperfrecords(records: perfrecord[], retention: number | undefined, now: number): {
|
|
118
|
-
kept: perfrecord[];
|
|
119
|
-
pruned: number;
|
|
120
|
-
};
|
|
121
|
-
/**
|
|
122
|
-
* Snapshotdelta logic of the 1.1.68 family.
|
|
123
|
-
* The snapshot builder computes deltas against the previous snapshot of the same run: every region keeps a stable fingerprint, the delta emits only the changed regions with their fingerprints, and the full snapshot returns on the user configured cadence while an empty delta lets the executor skip the recomputation in full.
|
|
124
|
-
* The base snapshot ref must come from the same run: a delta against another run or against no base at all refuses, and the cadence stays the user's choice with no engine default.
|
|
125
|
-
*/
|
|
126
|
-
/** One region of a snapshot the delta engine compares: the region name and its content. */
|
|
127
|
-
export type snapshotregion = {
|
|
128
|
-
region: string;
|
|
129
|
-
content: string;
|
|
130
|
-
};
|
|
131
|
-
/** Stable local fingerprint of one region content so the delta engine recognizes unchanged regions without recomputation; the hash stays deterministic without a network dependency. */
|
|
132
|
-
export declare function regionfingerprint(region: string, content: string): string;
|
|
133
|
-
/** Computes one incrsnapshot delta against the base snapshot of the same run: only the added, changed and removed regions enter the change set, and the full snapshot returns once the user configured cadence of deltas elapsed. */
|
|
134
|
-
export declare function snapshotdeltaof(input: {
|
|
135
|
-
baseref: string;
|
|
136
|
-
runid: string;
|
|
137
|
-
base: snapshotregion[];
|
|
138
|
-
current: snapshotregion[];
|
|
139
|
-
deltasince?: number;
|
|
140
|
-
cadence?: number;
|
|
141
|
-
now: number;
|
|
142
|
-
}): incrsnapshotdelta;
|
|
143
|
-
/** Reads whether one incrsnapshot delta is empty: an empty delta with no full snapshot lets the executor skip the whole recomputation because nothing changed. */
|
|
144
|
-
export declare function isemptydelta(delta: incrsnapshotdelta): boolean;
|
|
145
|
-
/** Reads whether the executor skips the recomputation of one step: an empty delta against the same run base means the snapshot builder emits nothing and the step reuses the base observation. */
|
|
146
|
-
export declare function skipsrecomputation(delta: incrsnapshotdelta): boolean;
|
|
147
|
-
/** Reads the fingerprint of the change set one delta carries beside its base ref, so the executor deduplicates identical snapshot requests within a run. */
|
|
148
|
-
export declare function deltarequestkey(delta: incrsnapshotdelta): string;
|
|
149
|
-
/** Builds the base snapshot ref record of one run the memory keeps for its deltas: the ref, the run it belongs to and the time the run set it. */
|
|
150
|
-
export declare function snapshotbaserecord(input: {
|
|
151
|
-
runid: string;
|
|
152
|
-
ref: string;
|
|
153
|
-
now: number;
|
|
154
|
-
}): {
|
|
155
|
-
id: string;
|
|
156
|
-
runid: string;
|
|
157
|
-
ref: string;
|
|
158
|
-
at: number;
|
|
159
|
-
};
|
|
160
|
-
/** Reads the regions one delta touched, in the incrsnapshot change format the progress records reuse beside the step outcomes. */
|
|
161
|
-
export declare function deltachangesof(delta: incrsnapshotdelta): snapshotchange[];
|
|
162
|
-
/**
|
|
163
|
-
* Dombatch logic of the 1.1.68 family.
|
|
164
|
-
* The dom observer debounces rapid mutation bursts into one batch, debouncedom coalesces scroll, input and resize storms per window, and the snapshot builder batches every dom query into one pass: the batchquery plan folds repeated selectors so one snapshot costs one query pass, and the grouped selectors execute together inside one offscreen worker task.
|
|
165
|
-
* Every window stays the user's choice: an absent window passes events through uncoalesced, and no engine default ever caps a storm.
|
|
166
|
-
*/
|
|
167
|
-
/** Builds the debounce profiles of the user configured windows: only the event kinds with a window coalesce while the kinds without one pass every event through. */
|
|
168
|
-
export declare function debounceprofilesof(windows: Partial<Record<debounceprofile["kind"], number>>): debounceprofile[];
|
|
169
|
-
/** Coalesces one dom event storm into per kind batches: every event inside the window of its kind folds into the open batch, and a batch closes once the window since its first event elapsed. */
|
|
170
|
-
export declare function coalescedombursts(input: {
|
|
171
|
-
events: Array<{
|
|
172
|
-
kind: debounceprofile["kind"];
|
|
173
|
-
at: number;
|
|
174
|
-
}>;
|
|
175
|
-
profiles: debounceprofile[];
|
|
176
|
-
now: number;
|
|
177
|
-
}): debouncedbatch[];
|
|
178
|
-
/** Debounces one rapid mutation burst of the dom observer into a single batch: every mutation inside the user window folds into one batch the observer delivers once. */
|
|
179
|
-
export declare function mutationbatchof(input: {
|
|
180
|
-
mutations: Array<{
|
|
181
|
-
at: number;
|
|
182
|
-
fingerprint?: string;
|
|
183
|
-
}>;
|
|
184
|
-
window?: number;
|
|
185
|
-
now: number;
|
|
186
|
-
}): debouncedbatch;
|
|
187
|
-
/** Builds one batchquery plan from the selector list a snapshot needs: repeated selectors fold away so the plan carries every distinct selector exactly once and the snapshot costs one query pass. */
|
|
188
|
-
export declare function batchqueryplanof(selectors: string[]): batchqueryplan;
|
|
189
|
-
/** Executes one batchquery plan in a single pass: the resolver runs once per distinct selector and every repeated selector shares the resolution of its first occurrence. */
|
|
190
|
-
export declare function runbatchquery(input: {
|
|
191
|
-
plan: batchqueryplan;
|
|
192
|
-
resolver: (selector: string) => string;
|
|
193
|
-
}): {
|
|
194
|
-
resolutions: Record<string, string>;
|
|
195
|
-
queries: number;
|
|
196
|
-
};
|
|
197
|
-
/** Shapes one batchquery plan into the offscreen worker task payload the worker pool executes: the grouped selectors travel together so one worker task answers the whole pass. */
|
|
198
|
-
export declare function batchquerytaskof(input: {
|
|
199
|
-
plan: batchqueryplan;
|
|
200
|
-
runid: string;
|
|
201
|
-
stepid: string;
|
|
202
|
-
}): {
|
|
203
|
-
task: "batchquery";
|
|
204
|
-
runid: string;
|
|
205
|
-
stepid: string;
|
|
206
|
-
selectors: string[];
|
|
207
|
-
folded: number;
|
|
208
|
-
};
|
|
209
|
-
/** Reads the query savings of one batchquery pass: the folded duplicate count beside the distinct queries the pass ran. */
|
|
210
|
-
export declare function batchquerysavings(plan: batchqueryplan): {
|
|
211
|
-
distinct: number;
|
|
212
|
-
folded: number;
|
|
213
|
-
saved: number;
|
|
214
|
-
};
|
|
215
|
-
/**
|
|
216
|
-
* Stepmeter logic of the 1.1.69 family.
|
|
217
|
-
* The durationmeter measures every step with monotonic clocks and writes its samples into the perf records of the 1.1.68 family, the selectorprofile counts the resolution time and the failure rate per selector and flags the selectors above the user latency threshold, the steptrace spans nest per step and per worker task and export one trace file for the timeline view, the startupmeter measures the cold start from the startup event to ready with the lazymods budget it spent, the coldstart keeps the ready path under the user target with the heavy modules out of the first paint path, and the slowmo replays a recorded run at the user chosen speed factor with its pauses linked to their steptrace spans.
|
|
218
|
-
* Every threshold, target and factor stays a user choice: the meters measure and never refuse.
|
|
219
|
-
*/
|
|
220
|
-
/** Builds one durationmeter sample from a monotonic clock pair: the step start and end clocks with the duration it measured. */
|
|
221
|
-
export declare function durationsampleof(input: {
|
|
222
|
-
stepid: string;
|
|
223
|
-
start: number;
|
|
224
|
-
end: number;
|
|
225
|
-
monotonic?: boolean;
|
|
226
|
-
}): durationsample;
|
|
227
|
-
/** Writes one durationmeter sample into the perf records of the 1.1.68 family: the sample becomes one perf record with its provenance attached. */
|
|
228
|
-
export declare function durationsampletoperf(input: {
|
|
229
|
-
runid: string;
|
|
230
|
-
sample: durationsample;
|
|
231
|
-
queries: number;
|
|
232
|
-
cachehits: number;
|
|
233
|
-
delta: boolean;
|
|
234
|
-
now: number;
|
|
235
|
-
provenance?: {
|
|
236
|
-
origin?: string;
|
|
237
|
-
environment?: string;
|
|
238
|
-
task?: string;
|
|
239
|
-
};
|
|
240
|
-
}): perfrecord;
|
|
241
|
-
/** Reads the selectorprofile stats of one selector: the resolution count, the total and average resolution time and the failure rate, with the flag the selectors above the user latency threshold carry. */
|
|
242
|
-
export declare function selectorprofileof(input: {
|
|
243
|
-
selector: string;
|
|
244
|
-
samples: Array<{
|
|
245
|
-
duration: number;
|
|
246
|
-
ok: boolean;
|
|
247
|
-
}>;
|
|
248
|
-
threshold?: number;
|
|
249
|
-
}): selectorstats;
|
|
250
|
-
/** Updates one selectorprofile stat with a fresh resolution sample beside its prior stats: the count, the total duration and the failure rate grow while the flag follows the user latency threshold. */
|
|
251
|
-
export declare function selectorstatsupdate(prior: selectorstats | undefined, input: {
|
|
252
|
-
selector: string;
|
|
253
|
-
duration: number;
|
|
254
|
-
ok: boolean;
|
|
255
|
-
threshold?: number;
|
|
256
|
-
}): selectorstats;
|
|
257
|
-
/** Builds one steptrace span: the step or the worker task it covers with its start and end clocks, its cause and its optional parent span. */
|
|
258
|
-
export declare function steptracespanof(input: {
|
|
259
|
-
runid: string;
|
|
260
|
-
stepid?: string;
|
|
261
|
-
task?: string;
|
|
262
|
-
start: number;
|
|
263
|
-
end: number;
|
|
264
|
-
cause: string;
|
|
265
|
-
parent?: string;
|
|
266
|
-
}): steptracespan;
|
|
267
|
-
/** Reads the child spans of one steptrace span so the trace nests per step and per worker task. */
|
|
268
|
-
export declare function spanchildren(spans: steptracespan[], parentid: string): steptracespan[];
|
|
269
|
-
/** Exports one trace file of a run for the timeline view: every span in start order with its event count. */
|
|
270
|
-
export declare function steptracefile(input: {
|
|
271
|
-
runid: string;
|
|
272
|
-
spans: steptracespan[];
|
|
273
|
-
}): {
|
|
274
|
-
runid: string;
|
|
275
|
-
format: "devthink-steptrace";
|
|
276
|
-
events: number;
|
|
277
|
-
spans: steptracespan[];
|
|
278
|
-
};
|
|
279
|
-
/** Builds one startupmeter sample: the cold start duration from the startup event to ready with the lazymods budget it spent, reported against the user target without ever refusing a load. */
|
|
280
|
-
export declare function startupsampleof(input: {
|
|
281
|
-
startedat: number;
|
|
282
|
-
readyat: number;
|
|
283
|
-
spent: number;
|
|
284
|
-
target?: number;
|
|
285
|
-
}): startupsample;
|
|
286
|
-
/** Reads the coldstart verdict of one startup sample: the ready path stays under the user target while the heavy modules stay out of the first paint path; an absent target keeps the verdict informational only. */
|
|
287
|
-
export declare function coldstartverdict(input: {
|
|
288
|
-
sample: startupsample;
|
|
289
|
-
heavy: string[];
|
|
290
|
-
firstpaint: string[];
|
|
291
|
-
}): {
|
|
292
|
-
withintarget: boolean;
|
|
293
|
-
heavyinfirstpaint: string[];
|
|
294
|
-
reason: string;
|
|
295
|
-
};
|
|
296
|
-
/** Opens one slowmo replay session of a recorded run at the user chosen speed factor; an absent factor keeps the replay at its recorded speed. */
|
|
297
|
-
export declare function slomosessionof(input: {
|
|
298
|
-
runid: string;
|
|
299
|
-
factor?: number;
|
|
300
|
-
now: number;
|
|
301
|
-
}): slowmosession;
|
|
302
|
-
/** Reads the pause window between two slowmo steps: the recorded duration divided by the user factor, so a factor of one half doubles every pause. */
|
|
303
|
-
export declare function slomostepdelay(input: {
|
|
304
|
-
factor: number;
|
|
305
|
-
duration: number;
|
|
306
|
-
}): number;
|
|
307
|
-
/** Pauses one slowmo replay between steps for inspection and links the pause to its steptrace span. */
|
|
308
|
-
export declare function slomopause(input: {
|
|
309
|
-
session: slowmosession;
|
|
310
|
-
stepid: string;
|
|
311
|
-
spanid: string;
|
|
312
|
-
}): slowmosession;
|
|
313
|
-
/** Resumes one slowmo replay from its inspection pause; the replay keeps its factor and its run. */
|
|
314
|
-
export declare function slomoresume(session: slowmosession): slowmosession;
|
|
315
|
-
/**
|
|
316
|
-
* Resourceaware logic of the 1.1.69 family.
|
|
317
|
-
* The tabsuspend discards idle tabs only during the waits longer than the user window, restores a tab before the next step that needs it and preserves the run state across the suspend and restore, the artifactcompress compresses captures and logs at rest and decompresses them lazily on read, the logprune removes the sealed logs past the user retention window while it prunes whole sealed runs only so the chain stays verifiable, the batteryaware scheduler defers non urgent scheduled runs on low battery and surfaces the deferrals in the attentionfeed, and the networkaware retry policies adapt their backoff to the failure kind while they honor the server signals when present.
|
|
318
|
-
* Every window, rule and floor stays a user choice: the deferrals, the codecs and the backoffs optimize the resource use and never refuse the work.
|
|
319
|
-
*/
|
|
320
|
-
/** Reads the tabsuspend plan of one wait: the tab suspends only during a wait longer than the user window while an absent window or a shorter wait never suspends the tab. */
|
|
321
|
-
export declare function suspendplan(input: {
|
|
322
|
-
waitduration: number;
|
|
323
|
-
window?: number;
|
|
324
|
-
}): {
|
|
325
|
-
suspend: boolean;
|
|
326
|
-
reason: string;
|
|
327
|
-
};
|
|
328
|
-
/** Builds one tabsuspend state: the suspended tab with its run, its restore url and the discard flag, so the run state survives the suspend and the restore. */
|
|
329
|
-
export declare function tabsuspendstateof(input: {
|
|
330
|
-
tabid: number;
|
|
331
|
-
runid: string;
|
|
332
|
-
restoreurl: string;
|
|
333
|
-
discarded: boolean;
|
|
334
|
-
now: number;
|
|
335
|
-
}): tabsuspendstate;
|
|
336
|
-
/** Reads the restore plan of one suspended tab: the tab restores before the next step that needs it while a discarded tab reloads its restore url and an undiscarded tab keeps its page state. */
|
|
337
|
-
export declare function tabsuspendrestoreplan(input: {
|
|
338
|
-
state: tabsuspendstate;
|
|
339
|
-
nextneedsurl: string;
|
|
340
|
-
}): {
|
|
341
|
-
restore: boolean;
|
|
342
|
-
reload: boolean;
|
|
343
|
-
reason: string;
|
|
344
|
-
};
|
|
345
|
-
/** Builds one artifactcompress record: the stored artifact with its codec and its lazy read flag, so the capture and log bytes compress at rest and decompress on read. */
|
|
346
|
-
export declare function artifactcompressof(input: {
|
|
347
|
-
artifactid: string;
|
|
348
|
-
codec?: "deflate" | "store";
|
|
349
|
-
lazy?: boolean;
|
|
350
|
-
now: number;
|
|
351
|
-
}): artifactcompressrecord;
|
|
352
|
-
/** Reads the read plan of one stored artifact: a deflate artifact decompresses lazily on read while a stored artifact reads its plain bytes directly. */
|
|
353
|
-
export declare function artifactreadplan(record: artifactcompressrecord): {
|
|
354
|
-
decode: "immediate" | "lazy";
|
|
355
|
-
reason: string;
|
|
356
|
-
};
|
|
357
|
-
/** Reads the logprune plan of one sealed log chain: the prune removes whole sealed runs past the user retention or size window while an unsealed run never prunes so the chain stays verifiable. */
|
|
358
|
-
export declare function logpruneplan(input: {
|
|
359
|
-
sealed: Array<{
|
|
360
|
-
runid: string;
|
|
361
|
-
sealedat: number;
|
|
362
|
-
bytes: number;
|
|
363
|
-
sealed: boolean;
|
|
364
|
-
}>;
|
|
365
|
-
rule: logprunerule;
|
|
366
|
-
now: number;
|
|
367
|
-
}): {
|
|
368
|
-
prune: string[];
|
|
369
|
-
keep: string[];
|
|
370
|
-
refused: string[];
|
|
371
|
-
};
|
|
372
|
-
/** Reads the batteryaware scheduling state: the non urgent scheduled runs defer while the battery stays under the user floor and never charges; the deferral never cancels a run. */
|
|
373
|
-
export declare function batteryawarestateof(input: {
|
|
374
|
-
level: number;
|
|
375
|
-
charging: boolean;
|
|
376
|
-
floor?: number;
|
|
377
|
-
scheduled: string[];
|
|
378
|
-
now: number;
|
|
379
|
-
}): batteryawarestate;
|
|
380
|
-
/** Reads the networkaware backoff of one retry: the policy of the failure kind sets the backoff window while a present server signal overrides it. */
|
|
381
|
-
export declare function networkbackoff(input: {
|
|
382
|
-
failurekind: string;
|
|
383
|
-
rules: networkretryrule[];
|
|
384
|
-
serversignal?: number;
|
|
385
|
-
}): number;
|
|
386
|
-
/**
|
|
387
|
-
* Batchscheduling logic of the 1.1.69 family.
|
|
388
|
-
* Batch run queues pace themselves against the sites they address: the queue pauses its enqueueing when the downstream steps fall behind past the user window and never drops a queued step, every domain runs inside its user chosen concurrency slots with the overflow queued per lane, batch requests space themselves through the politedelay profile with its jitter and its per domain floors, the adaptivepoll window widens while observations stay unchanged and narrows the moment changes resume, identical pending queries merge into one dispatch whose single result fans out to every waiter, and the snapshot cadence widens under memory pressure and restores when the pressure clears.
|
|
389
|
-
* Every window, limit and factor stays a user choice: the scheduler optimizes the pacing and never caps the work, and no budget ever bypasses the review.
|
|
390
|
-
*/
|
|
391
|
-
/** Reads the backpressure signal of one batch run queue: the queue pauses its enqueueing when the completed outcomes fall behind the enqueued steps past the user window, and the pause never drops a queued step. */
|
|
392
|
-
export declare function batchbackpressuresignal(input: {
|
|
393
|
-
runid: string;
|
|
394
|
-
enqueued: number;
|
|
395
|
-
completed: number;
|
|
396
|
-
window?: number;
|
|
397
|
-
now: number;
|
|
398
|
-
}): backpressuresignal;
|
|
399
|
-
/** Plans the domain lanes of one batch run: every domain runs at most its user chosen slots concurrently while the overflow steps queue per lane; a domain without a user limit stays unbounded. */
|
|
400
|
-
export declare function domainlanesfor(input: {
|
|
401
|
-
steps: Array<{
|
|
402
|
-
id: string;
|
|
403
|
-
domain: string;
|
|
404
|
-
}>;
|
|
405
|
-
limits: Record<string, number>;
|
|
406
|
-
}): domainlane[];
|
|
407
|
-
/** Moves the queued overflow of one domain lane into its running set as its slots free; the lane never runs more steps than the user chosen slots. */
|
|
408
|
-
export declare function advancelane(lane: domainlane, freed: number): domainlane;
|
|
409
|
-
/** Reads the politedelay of one domain: the base delay with the jitter window folded over it through the roll, never below the per domain floor the siteprofiles carry. */
|
|
410
|
-
export declare function politedelayfor(input: {
|
|
411
|
-
domain: string;
|
|
412
|
-
base: number;
|
|
413
|
-
floor?: number;
|
|
414
|
-
jitter?: number;
|
|
415
|
-
roll: number;
|
|
416
|
-
}): number;
|
|
417
|
-
/** Reads the next adaptivepoll interval: the window widens by the growth factor while observations stay unchanged and narrows the moment changes resume, always inside the floor and the ceiling the user chose. */
|
|
418
|
-
export declare function adaptivepollnext(input: {
|
|
419
|
-
interval: number;
|
|
420
|
-
window: adaptivepollwindow;
|
|
421
|
-
changed: boolean;
|
|
422
|
-
}): number;
|
|
423
|
-
/** Merges identical pending queries into one dispatch: every request with the same key folds into one coalesced entry whose waiters list carries every waiter the single result fans out to. */
|
|
424
|
-
export declare function coalescequeries(input: {
|
|
425
|
-
requests: Array<{
|
|
426
|
-
key: string;
|
|
427
|
-
waiter: string;
|
|
428
|
-
}>;
|
|
429
|
-
}): coalescedrequest[];
|
|
430
|
-
/** Fans the single result of one coalesced dispatch out to every waiter that merged into it. */
|
|
431
|
-
export declare function coalescefanout<T>(entry: coalescedrequest, result: T): Array<{
|
|
432
|
-
waiter: string;
|
|
433
|
-
result: T;
|
|
434
|
-
}>;
|
|
435
|
-
/** Reads the snapshot cadence under memory pressure: the interval widens by the user chosen widening factor while the pressure stays high and restores to the base interval the moment the pressure clears. */
|
|
436
|
-
export declare function cadenceunderpressure(input: {
|
|
437
|
-
control: cadencecontrol;
|
|
438
|
-
pressure: boolean;
|
|
439
|
-
widening?: number;
|
|
440
|
-
}): cadencecontrol;
|
|
441
|
-
/**
|
|
442
|
-
* Lazyload logic of the 1.1.68 family.
|
|
443
|
-
* The heavy modules stay out of the startup path: every lazy module declares its id, its load reason and its capability requirements ahead of load, the loader resolves a module on first use while the capability checks stay exactly the checks the eager path runs, the prewarm hook warms the user chosen set on startup, and every resolution records load telemetry for startup analysis.
|
|
444
|
-
* Lazy loading never hides a capability: a module whose declared capability stays ungranted never resolves, and no budget ever refuses a load because every budget stays the user's choice.
|
|
445
|
-
*/
|
|
446
|
-
/** The catalog of lazy modules: the heavy parsers and the capture, compare and export families load lazily behind their first command while the startup path stays free of them. */
|
|
447
|
-
export declare function lazymodcatalog(): lazymoddescriptor[];
|
|
448
|
-
/** Reads one lazy module descriptor by id; an unknown id returns undefined so the caller keeps its eager fallback. */
|
|
449
|
-
export declare function lazymodof(id: string): lazymoddescriptor | undefined;
|
|
450
|
-
/** Resolves one lazy module on first use: the declared capabilities must all stay granted or the resolution records its refusal, and the load telemetry records the duration and the provenance of the first use. */
|
|
451
|
-
export declare function resolvelazymod(input: {
|
|
452
|
-
id: string;
|
|
453
|
-
granted: string[];
|
|
454
|
-
firstuse: boolean;
|
|
455
|
-
duration: number;
|
|
456
|
-
now: number;
|
|
457
|
-
provenance?: {
|
|
458
|
-
runid?: string;
|
|
459
|
-
stepid?: string;
|
|
460
|
-
surface?: string;
|
|
461
|
-
};
|
|
462
|
-
}): lazyloadrecord;
|
|
463
|
-
/** Prewarms the user chosen lazy module set on startup: every prewarmed module resolves immediately with its telemetry recorded while the modules outside the set stay out of the startup path. */
|
|
464
|
-
export declare function prewarmmodules(input: {
|
|
465
|
-
prewarmset: string[];
|
|
466
|
-
granted: string[];
|
|
467
|
-
now: number;
|
|
468
|
-
duration?: number;
|
|
469
|
-
}): lazyloadrecord[];
|
|
470
|
-
/** Builds the startup module budget view: the prewarmed modules lead the startup path, the lazy rest stays out of it, and the user configured budget reports over or under without ever refusing a load. */
|
|
471
|
-
export declare function startupbudgetof(input: {
|
|
472
|
-
prewarmset: string[];
|
|
473
|
-
budget?: number;
|
|
474
|
-
}): startupbudget;
|
|
475
|
-
/** Reads the startup cost the prewarm set adds: the module count the startup path carries beside the lazy rest, reported to the user with no engine ceiling. */
|
|
476
|
-
export declare function startupcostof(budget: startupbudget): {
|
|
477
|
-
startupmodules: number;
|
|
478
|
-
lazy: number;
|
|
479
|
-
note: string;
|
|
480
|
-
};
|
|
481
|
-
//# sourceMappingURL=perf.d.ts.map
|
package/dist/plan.d.ts
DELETED
|
@@ -1,134 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The plan module of the 1.1.90 consolidation: every correlated variation of the plan logic interned in this one file, so the module family carries one surface without duplicate variations.
|
|
3
|
-
* The correlation is the life of a plan file: planlint reads the plan on disk and lints it against the same policy engine the extension runs (originprofile grading, sensitive class consents, portable capability gates, schemastrict unknown field refusal, explicit gate declarations, loop and retry bounds) so an error diagnostic refuses the file before any run starts; planreview renders the review half of the interface the same plan passes on its way to execution (plancards with their risk groups and correction memory matches, stepapprove resolutions with their immutable log events, diffpreviews of write class steps with mask verdicts, stepstimeline nodes derived from progress records with no new state, and the hash chained logstream the surface verifies live as entries arrive).
|
|
4
|
-
* The linter never executes anything and the review surface never bypasses the human: every bound, window and buffer stays the user's choice with no engine cap.
|
|
5
|
-
*/
|
|
6
|
-
import type { classconsent, originprofile, planfile, planfilestep, planlintdiagnostic, portableruleset, sensitiveclass } from "./types.js";
|
|
7
|
-
/**
|
|
8
|
-
* Planlint logic of the 1.1.67 family.
|
|
9
|
-
* The plan file on disk lints against the same policy engine the extension runs: every step grades against the originprofile of the plan origin, every sensitive class needs the consent the extension would demand, every kind stays inside the portable capability set of the target runtime, unknown fields refuse under schemastrict, sensitive steps declare their gate explicitly, selectors that cannot resolve without a live page flag, and unbounded loops and missing retry bounds surface before any run starts.
|
|
10
|
-
* The linter never executes anything and never touches a page: it reads the plan file and the compiled portable rule set only, and an error diagnostic refuses the file before flowrun ever sees it.
|
|
11
|
-
*/
|
|
12
|
-
/** The step fields a plan file carries; any other field refuses under schemastrict with the path that names it. */
|
|
13
|
-
export declare const planfilestepfields: readonly string[];
|
|
14
|
-
/** The control flow kinds whose loop bound the linter reads; an absent bound flags as unbounded. */
|
|
15
|
-
export declare const loopkinds: readonly string[];
|
|
16
|
-
/** The retrying kinds whose attempts the linter reads; absent attempts flag as missing retry bounds. */
|
|
17
|
-
export declare const retrykinds: readonly string[];
|
|
18
|
-
/** Parses one plan file under schemastrict: the version, goal and origin are mandatory, every step maps onto the plan file step shape and unknown fields refuse with the path that names them. */
|
|
19
|
-
export declare function parseplanfile(value: unknown): planfile;
|
|
20
|
-
/** Reads the originprofile of one plan file: the profile builds from the declared kind grants exactly the way the extension builds it, so the lint and the runtime grade the same step the same way. */
|
|
21
|
-
export declare function planoriginprofile(file: planfile, now: number): originprofile;
|
|
22
|
-
/** Reads the derived risk of one plan file step: the same risk derivation the extension runs, so the lint and the runtime grade one step identically. The 1.1.80 cli family shares this grade with the risk summary planlint prints. */
|
|
23
|
-
export declare function plansteprisk(step: planfilestep): "read" | "interaction" | "sensitive";
|
|
24
|
-
/** Lints one plan file against the compiled portable rule set: every rule of the set runs, every diagnostic carries its code, path and severity, and an error diagnostic refuses the file before any run starts. */
|
|
25
|
-
export declare function lintplanfile(input: {
|
|
26
|
-
file: planfile;
|
|
27
|
-
ruleset: portableruleset;
|
|
28
|
-
capabilities: string[];
|
|
29
|
-
consents?: classconsent[];
|
|
30
|
-
now: number;
|
|
31
|
-
}): planlintdiagnostic[];
|
|
32
|
-
/** Formats one diagnostic set for the terminal: the human format lists one line per diagnostic with its severity, path and message, and the json format carries the whole set as one json array. */
|
|
33
|
-
export declare function formatdiagnostics(diagnostics: planlintdiagnostic[], format: "human" | "json"): string;
|
|
34
|
-
/** Reads the exit code of one lint run: any error diagnostic exits non zero, while info and warn diagnostics keep the run green. */
|
|
35
|
-
export declare function planlintexitcode(diagnostics: planlintdiagnostic[]): number;
|
|
36
|
-
/** Reads the cache key of one compiled portable rule set: the version and the rule ids compose one deterministic key so repeat runs reuse the parsed rules until the set changes. */
|
|
37
|
-
export declare function rulesetcachekey(ruleset: portableruleset): string;
|
|
38
|
-
/** Reads the plan lint summary of one file for the audit trail: the diagnostic counts per severity beside the exit code the run carries. */
|
|
39
|
-
export declare function planlintsummary(diagnostics: planlintdiagnostic[]): {
|
|
40
|
-
info: number;
|
|
41
|
-
warn: number;
|
|
42
|
-
error: number;
|
|
43
|
-
exitcode: number;
|
|
44
|
-
reason: string;
|
|
45
|
-
};
|
|
46
|
-
/** Reads the sensitive classes one plan file needs consent for, so the flowrun gate waits name the classes the terminal prompt shows. */
|
|
47
|
-
export declare function plansensitiveclasses(file: planfile): sensitiveclass[];
|
|
48
|
-
import type { agentplan, correctionentry, diffpreviewpayload, loglevel, logstreamevent, logstreamfilter, planprogress, plancard, plancardgroup, stepapproveresolution, stepstimelinenode, uisurface } from "./types.js";
|
|
49
|
-
/**
|
|
50
|
-
* Plan review surface logic of the 1.1.64 family, part one.
|
|
51
|
-
* The review half of the interface lives here: plancards render one card per proposed step with its kind, risk class, environment and options and group by risk class with the sensitive classes expanded by default while the matching corrections of correctionmemory sit beside their steps; stepapprove resolves exactly one step per distinct human action with approve, reject and edit provenance that lands in the immutable log; diffpreview compares the observed before state with the predicted after state of write class steps only and highlights added, changed and removed fields with masked values carrying their mask verdicts; the stepstimeline derives its pending, running, waiting, done, failed and halted nodes from progress records with no new state, showing durations, environment badges and deep link anchors; and the logstream appends live events with level, source and step ref behind a hash chain the surface verifies as entries arrive while the bounded live window keeps the full history in memory.
|
|
52
|
-
* No bound is ever hardcoded: the live buffer window stays the user's choice with no engine cap, and no review surface ever bypasses the human review.
|
|
53
|
-
*/
|
|
54
|
-
/** Builds one plancard per proposed step: the kind, the risk class, the execution environment, the reviewed options, the summary, the matching corrections from correctionmemory and the edit before approve offer of a pending plan. */
|
|
55
|
-
export declare function plancardsof(input: {
|
|
56
|
-
plan: agentplan;
|
|
57
|
-
corrections: correctionentry[];
|
|
58
|
-
}): plancard[];
|
|
59
|
-
/** Groups the plancards by risk class: the sensitive group expands by default while the read and interaction groups start folded. */
|
|
60
|
-
export declare function plancardgroups(cards: plancard[]): plancardgroup[];
|
|
61
|
-
/** Builds one stepapprove resolution: the step, the plan, the origin, the decision, the distinct human surface and the edited step shape an edit carries. */
|
|
62
|
-
export declare function stepresolutionof(input: {
|
|
63
|
-
stepid: string;
|
|
64
|
-
planid: string;
|
|
65
|
-
origin: string;
|
|
66
|
-
resolution: "approve" | "reject" | "edit";
|
|
67
|
-
surface: uisurface;
|
|
68
|
-
edited?: string;
|
|
69
|
-
at: number;
|
|
70
|
-
}): stepapproveresolution;
|
|
71
|
-
/** Builds the immutable log event of one stepapprove resolution: the review kind entry the sealed chain keeps. */
|
|
72
|
-
export declare function resolutionlogeventof(resolution: stepapproveresolution): {
|
|
73
|
-
kind: "review";
|
|
74
|
-
summary: string;
|
|
75
|
-
stepid: string;
|
|
76
|
-
};
|
|
77
|
-
/** Appends one stepapprove resolution to the per origin history: the review provenance stays queryable per origin. */
|
|
78
|
-
export declare function resolutionhistoryafter(history: stepapproveresolution[], resolution: stepapproveresolution): stepapproveresolution[];
|
|
79
|
-
/** Derives the mask verdicts of one state pair: every sensitive field shape carries its verdict reason while the rest stays unmasked. */
|
|
80
|
-
export declare function maskverdictsof(state: Record<string, string>, sensitivefields: string[]): Record<string, string>;
|
|
81
|
-
/** Compares the observed before state with the predicted after state of one write class step: added, changed and removed fields with the mask verdicts of masked values. */
|
|
82
|
-
export declare function diffpreviewof(input: {
|
|
83
|
-
stepid: string;
|
|
84
|
-
before: Record<string, string>;
|
|
85
|
-
after: Record<string, string>;
|
|
86
|
-
maskverdicts?: Record<string, string>;
|
|
87
|
-
provenance: "inline" | "offscreenworker";
|
|
88
|
-
}): diffpreviewpayload;
|
|
89
|
-
/** Derives the stepstimeline nodes from the plan and its progress records with no new state: pending, running, waiting, done, failed and halted statuses, durations, environment badges, the active mark and the deep link anchors. */
|
|
90
|
-
export declare function stepstimelinenodes(input: {
|
|
91
|
-
plan: agentplan;
|
|
92
|
-
progress?: planprogress;
|
|
93
|
-
now: number;
|
|
94
|
-
}): stepstimelinenode[];
|
|
95
|
-
/** Returns the deep link anchor of the active node the timeline scrolls to during a run. */
|
|
96
|
-
export declare function activetimelineanchor(nodes: stepstimelinenode[]): string | undefined;
|
|
97
|
-
/** The genesis hash the first logstream event chains to, mirroring the immutable log genesis. */
|
|
98
|
-
export declare const logstreamgenesis: string;
|
|
99
|
-
/** Builds one logstream event behind the hash chain: the level, the source, the origin, the summary, the optional step ref, the mask verdict of the source payload and the link to the previous event. */
|
|
100
|
-
export declare function logstreameventof(input: {
|
|
101
|
-
level: loglevel;
|
|
102
|
-
source: string;
|
|
103
|
-
origin: string;
|
|
104
|
-
summary: string;
|
|
105
|
-
stepid?: string;
|
|
106
|
-
masked: boolean;
|
|
107
|
-
maskverdict: string;
|
|
108
|
-
previous: string;
|
|
109
|
-
at: number;
|
|
110
|
-
}): Promise<logstreamevent>;
|
|
111
|
-
/** Appends one logstream event to the in memory history: the history stays full while the live window reads its bounded slice. */
|
|
112
|
-
export declare function appendlogstreamevent(events: logstreamevent[], event: logstreamevent): logstreamevent[];
|
|
113
|
-
/** Filters the logstream events by level, origin and step ref: an absent filter keeps every event. */
|
|
114
|
-
export declare function filterlogstream(events: logstreamevent[], filter: logstreamfilter): logstreamevent[];
|
|
115
|
-
/** Returns the bounded live window of the logstream: the user configured bound keeps the newest events while the full history stays in memory; an absent bound keeps every event live. */
|
|
116
|
-
export declare function livebufferof(events: logstreamevent[], bound: number | undefined): logstreamevent[];
|
|
117
|
-
/** Verifies the logstream hash chain live as entries arrive: every event links to its predecessor and a broken link names its position. */
|
|
118
|
-
export declare function verifylogstream(events: logstreamevent[]): Promise<{
|
|
119
|
-
valid: boolean;
|
|
120
|
-
brokenat?: number;
|
|
121
|
-
reason: string;
|
|
122
|
-
}>;
|
|
123
|
-
/** Copies one verified range of the logstream as an audit excerpt: an unverified chain refuses the copy while a verified range renders its entries with level, source and mask verdict. */
|
|
124
|
-
export declare function auditexcerptof(events: logstreamevent[], input: {
|
|
125
|
-
from: number;
|
|
126
|
-
to: number;
|
|
127
|
-
}): Promise<{
|
|
128
|
-
ok: boolean;
|
|
129
|
-
text: string;
|
|
130
|
-
reason: string;
|
|
131
|
-
}>;
|
|
132
|
-
/** Maps one audit kind onto the logstream level its event carries: errors stream as error, the refusal family streams as warn and the rest streams as info. */
|
|
133
|
-
export declare function loglevelof(kind: string): loglevel;
|
|
134
|
-
//# sourceMappingURL=plan.d.ts.map
|