@wenathlan/devthink 2.0.12 → 2.0.14
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 +20 -0
- package/accounts.ts +2087 -0
- package/agent.ts +2331 -0
- package/antigravity.ts +2139 -0
- package/apifreeze.ts +4146 -0
- package/auth.ts +642 -0
- package/background.ts +16837 -0
- package/bridge.ts +2080 -0
- package/build.ts +54 -0
- package/bun.ts +26 -0
- package/capture.ts +1614 -0
- package/checksecrets.ts +72 -0
- package/cjs.ts +9 -0
- package/cli.ts +3500 -0
- package/commands.ts +1101 -0
- package/companion.ts +450 -0
- package/compatibility.ts +37 -0
- package/config.ts +3137 -0
- package/constants.ts +943 -0
- package/core.ts +1473 -0
- package/crossbrowser.ts +1359 -0
- package/dashdone.ts +605 -0
- package/data.ts +943 -0
- package/database.ts +133 -0
- package/debug.ts +850 -0
- package/deno.ts +27 -0
- package/devthink.ts +707 -0
- package/dist/accounts.d.ts +409 -0
- package/dist/agent.d.ts +837 -0
- package/dist/antigravity.d.ts +380 -0
- package/dist/apifreeze.d.ts +113 -0
- package/dist/auth.d.ts +224 -0
- package/{bridge.d.ts → dist/bridge.d.ts} +1 -1
- package/dist/capture.d.ts +595 -0
- package/dist/cjs.d.ts +6 -0
- package/{cli.js → dist/cli.js} +2 -2
- package/dist/commands.d.ts +310 -0
- package/dist/compatibility.d.ts +17 -0
- package/dist/config.d.ts +1853 -0
- package/dist/constants.d.ts +637 -0
- package/dist/core.d.ts +361 -0
- package/dist/data.d.ts +330 -0
- package/dist/database.d.ts +24 -0
- package/dist/debug.d.ts +270 -0
- package/dist/engine.d.ts +74 -0
- package/dist/environments.d.ts +244 -0
- package/dist/evidence.d.ts +277 -0
- package/dist/export.d.ts +311 -0
- package/dist/fingerprint.d.ts +594 -0
- package/dist/flow.d.ts +300 -0
- package/dist/gates.d.ts +103 -0
- package/dist/identity.d.ts +51 -0
- package/dist/ids.d.ts +7 -0
- package/dist/llm.d.ts +652 -0
- package/dist/models.d.ts +1807 -0
- package/dist/net.d.ts +325 -0
- package/dist/neutral.d.ts +41 -0
- package/dist/oauth.d.ts +703 -0
- package/dist/page.d.ts +1166 -0
- package/dist/perf.d.ts +481 -0
- package/dist/plan.d.ts +134 -0
- package/dist/project.d.ts +395 -0
- package/dist/providers.d.ts +37 -0
- package/dist/quota.d.ts +453 -0
- package/dist/recovery.d.ts +621 -0
- package/dist/request.d.ts +1492 -0
- package/dist/run.d.ts +779 -0
- package/dist/runtime.d.ts +212 -0
- package/dist/search.d.ts +375 -0
- package/dist/security.d.ts +534 -0
- package/dist/serve.d.ts +136 -0
- package/dist/session.d.ts +296 -0
- package/dist/storage.d.ts +53 -0
- package/dist/streaming.d.ts +1119 -0
- package/dist/swarm.d.ts +328 -0
- package/dist/tools.d.ts +170 -0
- package/dist/types.d.ts +8357 -0
- package/dist/utils.d.ts +82 -0
- package/dist/version.d.ts +7 -0
- package/dist/versionregistry.d.ts +406 -0
- package/dist/views.d.ts +579 -0
- package/dist/workbenchsession.d.ts +69 -0
- package/dist/workflow.d.ts +649 -0
- package/docs/readme.md +92 -0
- package/docs/schemas/antigravity.json +192 -0
- package/engine.ts +1524 -0
- package/environments.ts +1005 -0
- package/evidence.ts +643 -0
- package/export.ts +889 -0
- package/fingerprint.ts +1458 -0
- package/flow.ts +1190 -0
- package/gates.ts +307 -0
- package/gateway.ts +34 -0
- package/hardening.ts +191 -0
- package/headless.ts +369 -0
- package/http.ts +2110 -0
- package/identity.ts +246 -0
- package/ids.ts +26 -0
- package/index.ts +369 -0
- package/llm.ts +2682 -0
- package/mcp.ts +1835 -0
- package/{memory.js → memory.ts} +3834 -2310
- package/models.ts +3805 -0
- package/modes.ts +43 -0
- package/net.ts +1214 -0
- package/neutral.ts +362 -0
- package/node.ts +26 -0
- package/oauth.ts +2216 -0
- package/offscreen.ts +170 -0
- package/pack.ts +956 -0
- package/package.json +175 -82
- package/page.ts +7824 -0
- package/pagebridge.ts +1116 -0
- package/perf.ts +957 -0
- package/plan.ts +672 -0
- package/plugin.ts +76 -0
- package/{policy.js → policy.ts} +5073 -4679
- package/prisma.config.ts +27 -0
- package/progress.ts +1308 -0
- package/project.ts +1291 -0
- package/protocol.ts +4187 -0
- package/providers.ts +246 -0
- package/quota.ts +1887 -0
- package/recovery.ts +2433 -0
- package/request.ts +4482 -0
- package/run.ts +2135 -0
- package/runtime.ts +526 -0
- package/search.ts +1760 -0
- package/security.ts +1673 -0
- package/serve.ts +419 -0
- package/server.ts +5538 -0
- package/session.ts +1162 -0
- package/storage.ts +182 -0
- package/streaming.ts +4101 -0
- package/swarm.ts +884 -0
- package/sync.ts +56 -0
- package/tests/agentcert.test.ts +128 -0
- package/tests/agentfleet.test.ts +214 -0
- package/tests/agentreview.test.ts +241 -0
- package/tests/agentstream.test.ts +335 -0
- package/tests/agentwork.test.ts +356 -0
- package/tests/apifreeze.test.ts +290 -0
- package/tests/apimap.test.ts +112 -0
- package/tests/approvalgate.test.ts +175 -0
- package/tests/artifactmanifest.test.ts +204 -0
- package/tests/attentionfeed.test.ts +163 -0
- package/tests/backgroundruns.test.ts +100 -0
- package/tests/batchscheduling.test.ts +131 -0
- package/tests/blackboard.test.ts +238 -0
- package/tests/bridge.test.ts +1088 -0
- package/tests/browsercoverage.test.ts +134 -0
- package/tests/browserpolyfills.test.ts +124 -0
- package/tests/build.mjs +1260 -0
- package/tests/clientauth.test.ts +223 -0
- package/tests/clitools.test.ts +578 -0
- package/tests/confirmgates.test.ts +190 -0
- package/tests/containerpack.test.ts +143 -0
- package/tests/controlflow.test.ts +2120 -0
- package/tests/coordination.test.ts +345 -0
- package/tests/copyscreen.test.ts +139 -0
- package/tests/core.test.ts +417 -0
- package/tests/costcert.test.ts +95 -0
- package/tests/crossbrowser.test.ts +115 -0
- package/tests/cspaudit.test.ts +79 -0
- package/tests/dashdone.test.ts +615 -0
- package/tests/datagrid.test.ts +137 -0
- package/tests/doccheck.test.ts +107 -0
- package/tests/dombatch.test.ts +109 -0
- package/tests/emulation.test.ts +282 -0
- package/tests/environments.test.ts +259 -0
- package/tests/evidenceviews.test.ts +88 -0
- package/tests/exporttools.test.ts +185 -0
- package/tests/firefoxprep.test.ts +134 -0
- package/tests/flowlibrary.test.ts +242 -0
- package/tests/flowrun.test.ts +303 -0
- package/tests/forensics.test.ts +439 -0
- package/tests/gateway.test.ts +939 -0
- package/tests/headlesslib.test.ts +171 -0
- package/tests/httpstream.test.ts +277 -0
- package/tests/immutablelog.test.ts +157 -0
- package/tests/inboundguard.test.ts +177 -0
- package/tests/lazyload.test.ts +72 -0
- package/tests/librarymodes.test.ts +623 -0
- package/tests/llm.test.ts +696 -0
- package/tests/manifest.test.ts +226 -0
- package/tests/maskinputs.test.ts +150 -0
- package/tests/matrixverify.test.ts +111 -0
- package/tests/mavenpack.test.ts +75 -0
- package/tests/mcpserver.test.ts +704 -0
- package/tests/memory.test.ts +4155 -0
- package/tests/memorycare.test.ts +230 -0
- package/tests/migrateplan.test.ts +349 -0
- package/tests/minimization.test.ts +414 -0
- package/tests/modelroute.test.ts +112 -0
- package/tests/multiagent.test.ts +440 -0
- package/tests/nativebridge.test.ts +807 -0
- package/tests/navigation.test.ts +284 -0
- package/tests/nugetpack.test.ts +83 -0
- package/tests/orchestration.test.ts +449 -0
- package/tests/originpolicy.test.ts +405 -0
- package/tests/outputcompare.test.ts +97 -0
- package/tests/package.test.ts +91 -0
- package/tests/pagebridge.test.ts +5909 -0
- package/tests/pentest.test.ts +75 -0
- package/tests/perfrecords.test.ts +257 -0
- package/tests/permdiff.test.ts +85 -0
- package/tests/phishguard.test.ts +128 -0
- package/tests/pickerviews.test.ts +155 -0
- package/tests/pipelines.test.ts +381 -0
- package/tests/planlint.test.ts +240 -0
- package/tests/planreview.test.ts +383 -0
- package/tests/platformtargets.test.ts +56 -0
- package/tests/policy.test.ts +8284 -0
- package/tests/portability.test.ts +96 -0
- package/tests/progress.test.ts +1036 -0
- package/tests/promptlibrary.test.ts +116 -0
- package/tests/protocol.test.ts +4793 -0
- package/tests/publishingpipeline.test.ts +314 -0
- package/tests/quickactions.test.ts +164 -0
- package/tests/readiness.test.ts +78 -0
- package/tests/recipes.test.ts +163 -0
- package/tests/redactshots.test.ts +216 -0
- package/tests/registernvidiakeys.ts +51 -0
- package/tests/relayserve.test.ts +304 -0
- package/tests/releasenotes.test.ts +276 -0
- package/tests/resilience.test.ts +467 -0
- package/tests/resourceaware.test.ts +187 -0
- package/tests/runbudget.test.ts +125 -0
- package/tests/runhistory.test.ts +299 -0
- package/tests/runreplay.test.ts +113 -0
- package/tests/runresume.test.ts +184 -0
- package/tests/runstate.test.ts +288 -0
- package/tests/runtimeadapters.test.ts +251 -0
- package/tests/safariskeleton.test.ts +115 -0
- package/tests/sandboxframe.test.ts +196 -0
- package/tests/sbom.test.ts +105 -0
- package/tests/secretvault.test.ts +188 -0
- package/tests/selcache.test.ts +111 -0
- package/tests/sessioninterface.test.ts +791 -0
- package/tests/sessions.test.ts +591 -0
- package/tests/siteprefs.test.ts +228 -0
- package/tests/snapshotdelta.test.ts +165 -0
- package/tests/statusviews.test.ts +237 -0
- package/tests/stepmeter.test.ts +200 -0
- package/tests/streamparse.test.ts +163 -0
- package/tests/stylepruning.test.ts +90 -0
- package/tests/surfaces.test.ts +282 -0
- package/tests/sweep.test.ts +78 -0
- package/tests/syncbridge.test.ts +164 -0
- package/tests/taskqueue.test.ts +206 -0
- package/tests/toolcalls.test.ts +336 -0
- package/tests/toolcatalog.test.ts +201 -0
- package/tests/torture-agent.test.ts +706 -0
- package/tests/torture-auth.test.ts +461 -0
- package/tests/torture-commands.test.ts +895 -0
- package/tests/torture-data.test.ts +923 -0
- package/tests/torture-environments.test.ts +285 -0
- package/tests/torture-export.test.ts +263 -0
- package/tests/torture-http.test.ts +1379 -0
- package/tests/torture-llm.test.ts +808 -0
- package/tests/torture-memory.test.ts +1084 -0
- package/tests/torture-plan.test.ts +829 -0
- package/tests/torture-run.test.ts +626 -0
- package/tests/torture-session.test.ts +928 -0
- package/tests/torture-swarm.test.ts +1245 -0
- package/tests/torture-tools.test.ts +964 -0
- package/tests/torture-workflow.test.ts +2354 -0
- package/tests/tourviews.test.ts +52 -0
- package/tests/transparency.test.ts +147 -0
- package/tests/trigger.test.ts +941 -0
- package/tests/v1sunset.test.ts +428 -0
- package/tests/virtlist.test.ts +94 -0
- package/tests/vision.test.ts +540 -0
- package/tests/vsixpack.test.ts +145 -0
- package/tests/webapi.test.ts +523 -0
- package/tests/workflow.test.ts +1785 -0
- package/tests/workfloweditor.test.ts +759 -0
- package/tests/xpipack.test.ts +128 -0
- package/tools.ts +734 -0
- package/types.ts +9908 -0
- package/umd.ts +9 -0
- package/utils.ts +249 -0
- package/version.ts +8 -0
- package/versionregistry.ts +1310 -0
- package/views.ts +2153 -0
- package/vitest.config.ts +12 -0
- package/web/App.tsx +78 -0
- package/web/README.md +47 -0
- package/web/capacitor.config.ts +46 -0
- package/web/const.ts +19 -0
- package/web/control.shell.tsx +66 -0
- package/web/dashboardpage.ts +554 -0
- package/web/db.ts +493 -0
- package/web/design.html +541 -0
- package/web/gatewayview/Gateway.tsx +345 -0
- package/web/gatewayview/config.ts +1042 -0
- package/web/gatewayview/definition.ts +174 -0
- package/web/icons.ts +15 -0
- package/{manifest.json → web/manifest.json} +1 -1
- package/web/optionspage.ts +691 -0
- package/web/popup.ts +1651 -0
- package/web/schema.prisma +176 -0
- package/web/sidepanel.ts +7941 -0
- package/web/sitemanifest.json +13 -0
- package/web/terminal-ui.tsx +622 -0
- package/web/transparencypage.ts +541 -0
- package/web/vite.config.ts +39 -0
- package/web/workspace.ts +23 -0
- package/workbenchmemory.ts +104 -0
- package/workbenchsession.ts +304 -0
- package/workflow.ts +4495 -0
- package/bridge.d.ts.map +0 -1
- package/bridge.js +0 -1877
- package/bun.d.ts.map +0 -1
- package/bun.js +0 -52329
- package/caps/background.json +0 -712
- package/caps/cli.json +0 -360
- package/caps/library.json +0 -3611
- package/caps/mcp.json +0 -126
- package/caps/pagebridge.json +0 -377
- package/caps/popup.json +0 -51
- package/caps/sidepanel.json +0 -522
- package/checksums.txt +0 -142
- package/cli.d.ts.map +0 -1
- package/companion.d.ts.map +0 -1
- package/companion.js +0 -389
- package/crossbrowser.d.ts.map +0 -1
- package/crossbrowser.js +0 -1191
- package/dashdone.d.ts.map +0 -1
- package/dashdone.js +0 -368
- package/deno.d.ts.map +0 -1
- package/deno.js +0 -52325
- package/devthink.umd.js +0 -52346
- package/fixtures/bun.ts +0 -7
- package/fixtures/cjs.js +0 -6
- package/fixtures/deno.ts +0 -6
- package/fixtures/example-org-pagestate.json +0 -22
- package/fixtures/importers/automa-workflow.json +0 -18
- package/fixtures/importers/selenium-side.json +0 -20
- package/fixtures/importers/tabular-plan.csv +0 -7
- package/fixtures/importers/uivision-macro.json +0 -10
- package/fixtures/importers/v1-plan.json +0 -13
- package/fixtures/mcp-client.mjs +0 -14
- package/fixtures/pages/checkout.html +0 -192
- package/fixtures/pages/dashboard.html +0 -110
- package/fixtures/pages/feed.html +0 -113
- package/fixtures/pages/product-grid.html +0 -150
- package/fixtures/plans/form-inventory-plan.json +0 -11
- package/fixtures/plans/release-notes-plan.json +0 -11
- package/fixtures/recipes/agentscompete.json +0 -11
- package/fixtures/recipes/agentsforms.json +0 -11
- package/fixtures/recipes/agentsmonitor.json +0 -11
- package/fixtures/recipes/agentsreview.json +0 -29
- package/fixtures/recipes/agentswarm.json +0 -11
- package/fixtures/recipes/fillcalendar.json +0 -12
- package/fixtures/recipes/fillcheckout.json +0 -13
- package/fixtures/recipes/filldependentdropdowns.json +0 -12
- package/fixtures/recipes/fillfromcsv.json +0 -13
- package/fixtures/recipes/fillloginform.json +0 -12
- package/fixtures/recipes/fillmultistepwizard.json +0 -13
- package/fixtures/recipes/fillregistration.json +0 -12
- package/fixtures/recipes/fillsearchfilters.json +0 -12
- package/fixtures/recipes/filltypeahead.json +0 -11
- package/fixtures/recipes/monitoralerts.json +0 -12
- package/fixtures/recipes/monitoravailability.json +0 -11
- package/fixtures/recipes/monitornetworkquiet.json +0 -12
- package/fixtures/recipes/monitorpagechanges.json +0 -11
- package/fixtures/recipes/monitorpricechange.json +0 -11
- package/fixtures/recipes/monitorschedule.json +0 -12
- package/fixtures/recipes/scrapedynamicprices.json +0 -13
- package/fixtures/recipes/scrapeimagegallery.json +0 -12
- package/fixtures/recipes/scrapeinfinitefeed.json +0 -13
- package/fixtures/recipes/scrapenestedlists.json +0 -12
- package/fixtures/recipes/scrapeproductgrid.json +0 -12
- package/fixtures/recipes/scrapereviews.json +0 -12
- package/fixtures/recipes/scrapesearchresults.json +0 -12
- package/fixtures/recipes/scrapetablepagination.json +0 -12
- package/fixtures/recipes/testaccessibility.json +0 -34
- package/fixtures/recipes/testconsoleerrors.json +0 -12
- package/fixtures/recipes/testdeeplinks.json +0 -12
- package/fixtures/recipes/testformvalidation.json +0 -13
- package/fixtures/recipes/testlayoutshift.json +0 -12
- package/fixtures/recipes/testlinkcheck.json +0 -12
- package/fixtures/recipes/testloadtiming.json +0 -12
- package/fixtures/recipes/testvisualdiff.json +0 -12
- package/fixtures/workflows/changelog-digest-workflow.json +0 -13
- package/fixtures/workflows/form-survey-workflow.json +0 -13
- package/gallery.json +0 -706
- package/hardening.d.ts.map +0 -1
- package/hardening.js +0 -188
- package/headless.d.ts.map +0 -1
- package/headless.js +0 -11522
- package/http.d.ts.map +0 -1
- package/http.js +0 -2165
- package/index.cjs +0 -54682
- package/index.d.ts.map +0 -1
- package/index.js +0 -52310
- package/index.neutral.js +0 -46343
- package/mcp.d.ts.map +0 -1
- package/mcp.js +0 -20515
- package/memory.d.ts.map +0 -1
- package/nativehost.template.json +0 -10
- package/node.cjs +0 -54686
- package/node.d.ts.map +0 -1
- package/pack.d.ts.map +0 -1
- package/pack.js +0 -805
- package/policy.d.ts.map +0 -1
- package/progress.d.ts.map +0 -1
- package/progress.js +0 -645
- package/protocol.d.ts.map +0 -1
- package/protocol.js +0 -8334
- package/schemas/audit.schema.json +0 -226
- package/schemas/capability.schema.json +0 -113
- package/schemas/envelope.schema.json +0 -162
- package/schemas/memory.schema.json +0 -51
- package/schemas/observation.schema.json +0 -113
- package/schemas/plan.schema.json +0 -208
- package/schemas/progress.schema.json +0 -126
- package/schemas/proposal.schema.json +0 -68
- package/schemas/session.schema.json +0 -82
- package/schemas/tool.schema.json +0 -94
- package/server.d.ts.map +0 -1
- package/server.js +0 -28877
- package/umd-example.html +0 -18
- package/umd.d.ts.map +0 -1
- /package/{bun.d.ts → dist/bun.d.ts} +0 -0
- /package/{cli.d.ts → dist/cli.d.ts} +0 -0
- /package/{companion.d.ts → dist/companion.d.ts} +0 -0
- /package/{crossbrowser.d.ts → dist/crossbrowser.d.ts} +0 -0
- /package/{dashdone.d.ts → dist/dashdone.d.ts} +0 -0
- /package/{deno.d.ts → dist/deno.d.ts} +0 -0
- /package/{hardening.d.ts → dist/hardening.d.ts} +0 -0
- /package/{headless.d.ts → dist/headless.d.ts} +0 -0
- /package/{http.d.ts → dist/http.d.ts} +0 -0
- /package/{index.d.ts → dist/index.d.ts} +0 -0
- /package/{mcp.d.ts → dist/mcp.d.ts} +0 -0
- /package/{memory.d.ts → dist/memory.d.ts} +0 -0
- /package/{node.d.ts → dist/node.d.ts} +0 -0
- /package/{pack.d.ts → dist/pack.d.ts} +0 -0
- /package/{policy.d.ts → dist/policy.d.ts} +0 -0
- /package/{progress.d.ts → dist/progress.d.ts} +0 -0
- /package/{protocol.d.ts → dist/protocol.d.ts} +0 -0
- /package/{server.d.ts → dist/server.d.ts} +0 -0
- /package/{umd.d.ts → dist/umd.d.ts} +0 -0
|
@@ -0,0 +1,534 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The security module of the 1.1.90 consolidation: every correlated variation of the trust boundary logic interned in this one file, so the module family carries one surface without duplicate variations.
|
|
3
|
+
* The correlation is the trust boundary cluster: originpolicy holds the origin consent posture (the denydefault refusal, the exact origin automation allowlist with no wildcard expansion, the per site originprofiles, the consent windows bound in time, the mid run revocation and the sensitive class classification); inboundguard holds the entry gate of the background (the schemastrict command validation, the origincheck verdicts, the connectallow sender list that ships empty and the ratelimit buckets that defer past bound commands); maskinputs holds the field shape recognizer that keeps typed, form and stored values out of every log, observation and export behind the redaction marker; immutablelog holds the append only hash chained run log with its completion seal and its read time tamper detection; phishguard holds the lookalike watch that blocks credential steps on origins resembling granted ones under the user threshold; secretvault holds the vault seam (values enter through put and leave at the last possible moment before a credential field, records carry the digest only, and the leak scan refuses plaintext secrets in plans); and transparency holds the grant grammar the transparency page renders (the grant rows, the consent window history, the connectallow list and the permdiff of installed updates).
|
|
4
|
+
* No window, threshold, shape list, bucket bound or retention is ever hardcoded anywhere in the family: every bound stays the user's choice, no security decision ever widens past the human review, and no secret value ever reaches a storage writer, a log entry, a memory record or an export path.
|
|
5
|
+
*/
|
|
6
|
+
import type { actionkind, automationallowlistentry, classconsent, consentwindow, consentscope, deniedevidence, originprofile, revokerunevent, sensitiveclass, toolstep } from "./types.js";
|
|
7
|
+
/**
|
|
8
|
+
* Origin consent policy logic of the 1.1.61 family.
|
|
9
|
+
* The trust boundary rules live here: the denydefault posture that refuses every ungranted origin, the per origin automation allowlist with exact origin matching and no wildcard expansion, the per site originprofiles that grant and deny single action kinds, the consentwindows that bind every grant in time with a named boundary, the mid run revokerun that halts the pending step and every queued step as a terminal session event, and the sensitive class classification that routes payment, credential, delete and publish steps through one fresh consent prompt per class per origin.
|
|
10
|
+
* No duration, boundary, kind list or class list is ever hardcoded: every window, profile and consent stays the user's choice, the active tab grant counts as exactly one explicit single origin grant, and no security decision ever bypasses the human review.
|
|
11
|
+
*/
|
|
12
|
+
/** The documented posture of the 1.1.61 family: every origin the user never granted stays refused by default. */
|
|
13
|
+
export declare const denydefaultposture: "denydefault";
|
|
14
|
+
/** Reads whether two origins match exactly: the allowlist binds every grant to one exact origin with no wildcard expansion, so a star, an empty segment or a scheme wildcard never covers any origin. */
|
|
15
|
+
export declare function exactorigin(origin: string, entry: string): boolean;
|
|
16
|
+
/** Refuses wildcard patterns as allowlist entries before any matching runs: no wildcard expansion exists because every grant binds to one exact origin. */
|
|
17
|
+
export declare function wildcardentry(entry: string): boolean;
|
|
18
|
+
/** Checks one origin against the per origin automation allowlist under the denydefault posture: an origin absent from the allowlist stays refused, the active tab origin counts as exactly one explicit single origin grant, and no wildcard expansion ever widens an entry. */
|
|
19
|
+
export declare function allowlistcheck(input: {
|
|
20
|
+
origin: string;
|
|
21
|
+
allowlist: automationallowlistentry[];
|
|
22
|
+
profileid?: string;
|
|
23
|
+
sessionorigin?: string;
|
|
24
|
+
}): {
|
|
25
|
+
allowed: boolean;
|
|
26
|
+
reason: string;
|
|
27
|
+
};
|
|
28
|
+
/** Builds one per site origin profile with its kind grants and denials; the profile consults before every sensitive kind on its origin. */
|
|
29
|
+
export declare function originprofileof(input: {
|
|
30
|
+
profileid?: string;
|
|
31
|
+
origin: string;
|
|
32
|
+
grants?: actionkind[];
|
|
33
|
+
denials?: actionkind[];
|
|
34
|
+
now: number;
|
|
35
|
+
}): originprofile;
|
|
36
|
+
/** Grants or denies one action kind on one origin profile; a kind already sitting on the opposite list moves so the lists never overlap. */
|
|
37
|
+
export declare function profilekind(input: {
|
|
38
|
+
profile: originprofile;
|
|
39
|
+
kind: actionkind;
|
|
40
|
+
decision: "grant" | "deny";
|
|
41
|
+
now: number;
|
|
42
|
+
}): originprofile;
|
|
43
|
+
/** Consults the per origin profile before one sensitive kind: an explicit denial refuses the kind on that origin, an explicit grant allows it while the fresh class consent gate still routes sensitive classes through their prompt, and an absent profile leaves the decision to the class consent gate. */
|
|
44
|
+
export declare function profilegrade(input: {
|
|
45
|
+
profile: originprofile | undefined;
|
|
46
|
+
kind: actionkind;
|
|
47
|
+
sensitive: boolean;
|
|
48
|
+
}): {
|
|
49
|
+
allowed: boolean;
|
|
50
|
+
consult: boolean;
|
|
51
|
+
reason: string;
|
|
52
|
+
};
|
|
53
|
+
/** Classifies one step into the sensitive classes: payment, credential, delete and publish kinds take their table class, the kind options refine the class when they carry card or credential field shapes, and uploads, downloads and evaluate grade sensitive by default without a named class. */
|
|
54
|
+
export declare function sensitiveclassesof(step: Pick<toolstep, "kind" | "value" | "options">): {
|
|
55
|
+
classes: sensitiveclass[];
|
|
56
|
+
bydefault: boolean;
|
|
57
|
+
sensitive: boolean;
|
|
58
|
+
reason: string;
|
|
59
|
+
};
|
|
60
|
+
/** Reads whether one fresh class consent covers a class on an origin: each sensitive class needs its own fresh prompt per origin, an expired consent covers nothing and a consent of another class never widens. */
|
|
61
|
+
export declare function classconsentcovers(consents: classconsent[], origin: string, sensitiveclass: sensitiveclass, now: number): boolean;
|
|
62
|
+
/** Reads which fresh class consents one sensitive step still needs on its origin: every class the classification names needs its own prompt and a default sensitive grade without classes needs the plain sensitive prompt that the window itself carries. */
|
|
63
|
+
export declare function missingclassconsents(input: {
|
|
64
|
+
origin: string;
|
|
65
|
+
classes: sensitiveclass[];
|
|
66
|
+
bydefault: boolean;
|
|
67
|
+
consents: classconsent[];
|
|
68
|
+
now: number;
|
|
69
|
+
}): {
|
|
70
|
+
needed: boolean;
|
|
71
|
+
missing: sensitiveclass[];
|
|
72
|
+
reason: string;
|
|
73
|
+
};
|
|
74
|
+
/** Opens one consent window bound in time: the duration stays the user's positive choice, the boundary names itself in plain language and no window ever defaults to unlimited. */
|
|
75
|
+
export declare function openconsentwindow(input: {
|
|
76
|
+
id?: string;
|
|
77
|
+
sessionid: string;
|
|
78
|
+
origin: string;
|
|
79
|
+
duration: number;
|
|
80
|
+
kinds: actionkind[];
|
|
81
|
+
now: number;
|
|
82
|
+
boundary?: string;
|
|
83
|
+
}): consentwindow;
|
|
84
|
+
/** Reads the state of one consent window at a time: an active window reports its remaining time while a window past its duration boundary reports its expiry. */
|
|
85
|
+
export declare function consentwindowstate(window: consentwindow, now: number): {
|
|
86
|
+
state: "active" | "expired";
|
|
87
|
+
remaining: number;
|
|
88
|
+
reason: string;
|
|
89
|
+
};
|
|
90
|
+
/** Checks one step against its consent window: the window scopes to exactly one session and one origin, an expired window suspends the run mid step, and a step outside the window scope or past its boundary never dispatches. */
|
|
91
|
+
export declare function windowgatesstep(input: {
|
|
92
|
+
window: consentwindow | undefined;
|
|
93
|
+
sessionid: string;
|
|
94
|
+
origin: string;
|
|
95
|
+
now: number;
|
|
96
|
+
}): {
|
|
97
|
+
allowed: boolean;
|
|
98
|
+
suspended: boolean;
|
|
99
|
+
reason: string;
|
|
100
|
+
};
|
|
101
|
+
/** Closes every consent window past its duration boundary: the expired windows keep their records for the audit trail while their grants bind no step anymore. */
|
|
102
|
+
export declare function expireconsentwindows(windows: consentwindow[], now: number): consentwindow[];
|
|
103
|
+
/** Renews a consent window only through a new explicit prompt: the renewal opens a brand new window record with its own duration and boundary while the old window stays closed in the history. */
|
|
104
|
+
export declare function renewconsentwindow(input: {
|
|
105
|
+
window: consentwindow;
|
|
106
|
+
duration: number;
|
|
107
|
+
kinds: actionkind[];
|
|
108
|
+
now: number;
|
|
109
|
+
}): {
|
|
110
|
+
renewed: consentwindow;
|
|
111
|
+
closed: consentwindow;
|
|
112
|
+
};
|
|
113
|
+
/** Revokes one run mid step as a terminal session event: the pending step and every queued step halt without executing, and the record names the acting user and the reason. */
|
|
114
|
+
export declare function revokerun(input: {
|
|
115
|
+
id?: string;
|
|
116
|
+
sessionid: string;
|
|
117
|
+
runid: string;
|
|
118
|
+
pendingstepid?: string;
|
|
119
|
+
queuedstepids?: string[];
|
|
120
|
+
actor: string;
|
|
121
|
+
reason?: string;
|
|
122
|
+
now: number;
|
|
123
|
+
}): revokerunevent;
|
|
124
|
+
/** Reads which steps one revocation halted with the pending step first: the rollback list the confirm dialog names before the user confirms. */
|
|
125
|
+
export declare function haltedstepsof(revocation: revokerunevent): {
|
|
126
|
+
pending?: string;
|
|
127
|
+
queued: string[];
|
|
128
|
+
};
|
|
129
|
+
/** Builds one consent scope grant that names the origin, the kinds and the boundary in a single record; the session start writes it into the immutable log. */
|
|
130
|
+
export declare function scopegrantof(input: {
|
|
131
|
+
origin: string;
|
|
132
|
+
kinds: actionkind[];
|
|
133
|
+
boundary: string;
|
|
134
|
+
now: number;
|
|
135
|
+
}): consentscope;
|
|
136
|
+
/** Builds one denied step evidence without navigation: the origin, the action kind and the deny reason in plain language. */
|
|
137
|
+
export declare function deniedevidenceof(input: {
|
|
138
|
+
origin: string;
|
|
139
|
+
kind: string;
|
|
140
|
+
reason: string;
|
|
141
|
+
now: number;
|
|
142
|
+
}): deniedevidence;
|
|
143
|
+
/** Builds the consent prompt text of one pending sensitive step: the exact origin, the kind, the class badge and the consent window duration the user chooses; the prompt always names a boundary and never defaults to unlimited. */
|
|
144
|
+
export declare function consentprompttext(input: {
|
|
145
|
+
origin: string;
|
|
146
|
+
kind: string;
|
|
147
|
+
classes: sensitiveclass[];
|
|
148
|
+
bydefault: boolean;
|
|
149
|
+
duration: number;
|
|
150
|
+
}): string;
|
|
151
|
+
/** Builds the denydefault notice of one origin for the popup: ungranted origins stay refused until the user grants them. */
|
|
152
|
+
export declare function denydefaultnotice(origin: string): string;
|
|
153
|
+
/** Builds the origin profile summary of the active tab for the popup: the granted and denied kinds the per site profile carries. */
|
|
154
|
+
export declare function profilesummary(profile: originprofile | undefined): string;
|
|
155
|
+
/** Builds the safedefaults profile of an unknown origin: the initial originprofile the executor applies when no profile exists grants the documented read kinds only and denies every sensitive class kind, so a first visit never runs a payment, credential, delete or publish step until the user edits the profile. */
|
|
156
|
+
export declare function safedefaultprofile(input: {
|
|
157
|
+
origin: string;
|
|
158
|
+
now: number;
|
|
159
|
+
profileid?: string;
|
|
160
|
+
}): originprofile;
|
|
161
|
+
/** Reads whether one action kind sits inside the reads only baseline of the safedefaults posture. */
|
|
162
|
+
export declare function safedefaultreadkind(kind: actionkind): boolean;
|
|
163
|
+
/** Builds the safedefaults notice of an unknown origin for the popup: the notice links to the originprofile editor because only the user widens a safedefaults profile. */
|
|
164
|
+
export declare function safedefaultnotice(origin: string): string;
|
|
165
|
+
import type { connectallowentry, deferredevent, origincheckverdict, ratelimitbucket, schemaerror } from "./types.js";
|
|
166
|
+
/**
|
|
167
|
+
* Inbound guard logic of the 1.1.62 family.
|
|
168
|
+
* Every message, command and connection that enters the background passes this guard chain: schemastrict validates each inbound command against its declared grammar and rejects unknown fields with the path and the expected shape, origincheck verdicts guard every runtime message and every port connection, connectallow holds the external senders the user allowed and ships empty by default so every unknown sender drops without handler execution, and the ratelimit buckets bound automation commands per origin and per session by deferring every command that exceeds its bucket until the window resets.
|
|
169
|
+
* No bound, window or sender list is ever hardcoded: the buckets stay user configured values with no hidden ceiling, and the connectallow list holds user managed entries only.
|
|
170
|
+
*/
|
|
171
|
+
/** The field shapes schemastrict understands: strings, numbers, booleans, plain objects and arrays, beside the absent marker a field the grammar never declared expects. */
|
|
172
|
+
export type schemashape = "string" | "number" | "boolean" | "object" | "array" | "absent";
|
|
173
|
+
/** Validates one inbound command under schemastrict: every field the grammar declares keeps its expected shape, a missing required field errors with its path, and a field the grammar never declared errors with the expected shape absent so the command never dispatches. */
|
|
174
|
+
export declare function schemacheck(input: {
|
|
175
|
+
command: Record<string, unknown>;
|
|
176
|
+
schema: Record<string, schemashape>;
|
|
177
|
+
required?: string[];
|
|
178
|
+
}): {
|
|
179
|
+
valid: boolean;
|
|
180
|
+
errors: schemaerror[];
|
|
181
|
+
};
|
|
182
|
+
/** Validates one inbound command envelope: the kind must be a non-empty string the dispatch registry knows, so an unknown command kind refuses before any handler runs. */
|
|
183
|
+
export declare function envelopecheck(input: {
|
|
184
|
+
command: Record<string, unknown>;
|
|
185
|
+
knownkinds: readonly string[];
|
|
186
|
+
}): {
|
|
187
|
+
valid: boolean;
|
|
188
|
+
errors: schemaerror[];
|
|
189
|
+
};
|
|
190
|
+
/** Checks one inbound runtime message or port connection through origincheck: an internal sender of this extension accepts, an external sender accepts only when its sender id sits in the connectallow list the user manages, and every other sender drops without handler execution. */
|
|
191
|
+
export declare function origincheckof(input: {
|
|
192
|
+
senderid?: string;
|
|
193
|
+
senderorigin?: string;
|
|
194
|
+
extensionid: string;
|
|
195
|
+
connectallow: connectallowentry[];
|
|
196
|
+
}): origincheckverdict;
|
|
197
|
+
/** Checks one port connection through the same origincheck grammar: only ports of this extension or of allowed external senders accept, and every other port closes at the handshake. */
|
|
198
|
+
export declare function portaccept(input: {
|
|
199
|
+
portname: string;
|
|
200
|
+
senderid?: string;
|
|
201
|
+
senderorigin?: string;
|
|
202
|
+
extensionid: string;
|
|
203
|
+
connectallow: connectallowentry[];
|
|
204
|
+
}): origincheckverdict;
|
|
205
|
+
/** Builds one connectallow entry: the external sender id the user allows, its display name and its optional origin scope; the list ships empty by default. */
|
|
206
|
+
export declare function connectallowentryof(input: {
|
|
207
|
+
senderid: string;
|
|
208
|
+
displayname: string;
|
|
209
|
+
origin?: string;
|
|
210
|
+
now: number;
|
|
211
|
+
}): connectallowentry;
|
|
212
|
+
/** The empty connectallow list the extension ships with: no external sender accepts until the user adds its entry. */
|
|
213
|
+
export declare const emptyconnectallow: connectallowentry[];
|
|
214
|
+
/** Validates the user configured ratelimit bucket bounds: the limit and the window stay positive user values because no hidden ceiling exists. */
|
|
215
|
+
export declare function bucketboundsvalid(limit: number, window: number): {
|
|
216
|
+
valid: boolean;
|
|
217
|
+
reason: string;
|
|
218
|
+
};
|
|
219
|
+
/** Builds one ratelimit bucket per origin and per session with its user configured bound and window. */
|
|
220
|
+
export declare function bucketof(input: {
|
|
221
|
+
origin: string;
|
|
222
|
+
sessionid: string;
|
|
223
|
+
limit: number;
|
|
224
|
+
window: number;
|
|
225
|
+
now: number;
|
|
226
|
+
}): ratelimitbucket;
|
|
227
|
+
/** Consumes one command from its bucket: a command inside its bound consumes, a command past its bound defers until the window resets, and a window past its reset starts a fresh window. */
|
|
228
|
+
export declare function bucketconsume(input: {
|
|
229
|
+
bucket: ratelimitbucket;
|
|
230
|
+
now: number;
|
|
231
|
+
}): {
|
|
232
|
+
allowed: boolean;
|
|
233
|
+
deferred: boolean;
|
|
234
|
+
bucket: ratelimitbucket;
|
|
235
|
+
resetsat: number;
|
|
236
|
+
reason: string;
|
|
237
|
+
};
|
|
238
|
+
/** Builds one deferred command event: the step the bucket deferred with the reason and the reset time it waits for. */
|
|
239
|
+
export declare function deferredeventof(input: {
|
|
240
|
+
stepid: string;
|
|
241
|
+
kind: string;
|
|
242
|
+
origin: string;
|
|
243
|
+
reason: string;
|
|
244
|
+
resetsat: number;
|
|
245
|
+
now: number;
|
|
246
|
+
id?: string;
|
|
247
|
+
}): deferredevent;
|
|
248
|
+
/** Reads whether one deferred command may retry: the deferral holds until its bucket window resets. */
|
|
249
|
+
export declare function deferredready(deferred: deferredevent, now: number): boolean;
|
|
250
|
+
import type { maskrule, observation, runsettings } from "./types.js";
|
|
251
|
+
/**
|
|
252
|
+
* Mask inputs logic of the 1.1.61 family.
|
|
253
|
+
* The masking rules live here: typed values, form values and stored values never reach a log, an observation or an export unmasked when their field shapes match the documented password, token, card and secret families or the shapes the user configured; the observation schema keeps its field shapes while the values behind masked shapes carry their redaction marker instead.
|
|
254
|
+
* No shape list is closed: the documented four families stay the recognition baseline and the user extends them through the global maskshapes setting and the per origin mask rules, because a sensitive field shape stays the user's knowledge, never the engine's guess.
|
|
255
|
+
*/
|
|
256
|
+
/** The documented mask shape families the recognizer reads by default: password, token, card and secret field shapes; the user extends the list, never narrows the recognition below it. */
|
|
257
|
+
export declare const defaultmaskshapes: readonly string[];
|
|
258
|
+
/** The redaction marker every masked value carries; the marker stays visible so a review sees that a value existed without reading it. */
|
|
259
|
+
export declare const maskmarker = "[redacted]";
|
|
260
|
+
/** Reads the shape family one field name matches: password, token, card and secret shapes recognize by name while every other field keeps its value. */
|
|
261
|
+
export declare function fieldshapekind(name: string): "password" | "token" | "card" | "secret" | undefined;
|
|
262
|
+
/** Reads the effective mask shapes of one origin: the documented four families, the global user configured shapes and the per origin mask rules join into one recognition list. */
|
|
263
|
+
export declare function shapesof(input: {
|
|
264
|
+
settings?: runsettings;
|
|
265
|
+
rules: maskrule[];
|
|
266
|
+
origin?: string;
|
|
267
|
+
}): string[];
|
|
268
|
+
/** Reads whether one field name matches the effective shapes: the documented recognizer runs first and the configured shapes match by substring. */
|
|
269
|
+
export declare function maskingfield(name: string, shapes: string[]): boolean;
|
|
270
|
+
/** Masks one value behind the redaction marker; an empty value stays empty because nothing existed to redact. */
|
|
271
|
+
export declare function maskvalue(value: string): string;
|
|
272
|
+
/** Masks one named field when its shape matches: the field keeps its name while its value carries the redaction marker. */
|
|
273
|
+
export declare function maskfield(input: {
|
|
274
|
+
name: string;
|
|
275
|
+
value: string;
|
|
276
|
+
shapes: string[];
|
|
277
|
+
}): string;
|
|
278
|
+
/** Masks the typed values of one record deeply: every key whose shape matches keeps its key while its string value carries the redaction marker, and nested records walk the same rule. */
|
|
279
|
+
export declare function maskrecord(record: Record<string, unknown>, shapes: string[]): Record<string, unknown>;
|
|
280
|
+
/** Masks the typed value and the reviewed options of one step before they reach any log writer: a step whose target or kind names a masked shape keeps its shape while the typed value carries the redaction marker. */
|
|
281
|
+
export declare function masktypedvalues(input: {
|
|
282
|
+
step: Pick<toolstep, "kind" | "target" | "value" | "options">;
|
|
283
|
+
shapes: string[];
|
|
284
|
+
}): {
|
|
285
|
+
value?: string;
|
|
286
|
+
options?: string;
|
|
287
|
+
};
|
|
288
|
+
/** Masks one captured form state: every field keeps its name and type while a value behind a masked shape carries the redaction marker, so the observation schema keeps its field shapes but masks their values. */
|
|
289
|
+
export declare function maskformstate<T extends {
|
|
290
|
+
name: string;
|
|
291
|
+
value: string;
|
|
292
|
+
}>(fields: T[], shapes: string[]): Array<T & {
|
|
293
|
+
value: string;
|
|
294
|
+
}>;
|
|
295
|
+
/** Masks one observation payload before logging: the schema keeps every field shape while the option lists of fields whose names match a masked shape carry the redaction marker instead of their entries. */
|
|
296
|
+
export declare function maskobservation(shot: observation, shapes: string[]): observation;
|
|
297
|
+
/** Masks the stored values of one storage record: the keys keep their names while a value behind a masked shape carries the redaction marker. */
|
|
298
|
+
export declare function maskstoredvalues(record: Record<string, string>, shapes: string[]): Record<string, string>;
|
|
299
|
+
/** Excludes masked values from every export of the run record: a value that already carries the redaction marker stays visible as evidence a value existed, while any raw value behind a masked shape carries the marker before the export leaves the browser. */
|
|
300
|
+
export declare function maskexport(record: Record<string, unknown>, shapes: string[]): Record<string, unknown>;
|
|
301
|
+
import type { immutablelogentry, logeventkind, loghash, sealedlog, storedrunlog } from "./types.js";
|
|
302
|
+
/** Derives the hash chain link of one log entry: the sha-256 over the predecessor hash and the canonical entry body, written once at append time. */
|
|
303
|
+
export declare function entryhashof(input: {
|
|
304
|
+
previous: string;
|
|
305
|
+
entry: Omit<immutablelogentry, "hash">;
|
|
306
|
+
}): Promise<loghash>;
|
|
307
|
+
/** Builds one log entry with its chain link derived at append time: the event kind, the summary, the origin and step provenance and the time. */
|
|
308
|
+
export declare function logentryof(input: {
|
|
309
|
+
id?: string;
|
|
310
|
+
runid: string;
|
|
311
|
+
kind: logeventkind;
|
|
312
|
+
summary: string;
|
|
313
|
+
origin: string;
|
|
314
|
+
stepid?: string;
|
|
315
|
+
at: number;
|
|
316
|
+
previous: string;
|
|
317
|
+
}): Promise<immutablelogentry>;
|
|
318
|
+
/** Opens one empty run log: the first entry of the log chains to the genesis hash of exactly sixty-four zeros. */
|
|
319
|
+
export declare function openrunlog(input: {
|
|
320
|
+
runid: string;
|
|
321
|
+
sessionid: string;
|
|
322
|
+
now: number;
|
|
323
|
+
}): storedrunlog;
|
|
324
|
+
/** Reads the hash of the last entry of one log: the value the next append chains to, with the genesis hash for an empty log. */
|
|
325
|
+
export declare function lasthashof(log: storedrunlog): string;
|
|
326
|
+
/** Appends one event to the run log inside a single storage transaction the caller persists: the entry hash chains to its predecessor and is written at append time, and a sealed log refuses every append because the seal is terminal. */
|
|
327
|
+
export declare function appendlogentry(input: {
|
|
328
|
+
log: storedrunlog;
|
|
329
|
+
kind: logeventkind;
|
|
330
|
+
summary: string;
|
|
331
|
+
origin: string;
|
|
332
|
+
stepid?: string;
|
|
333
|
+
at: number;
|
|
334
|
+
id?: string;
|
|
335
|
+
}): Promise<storedrunlog>;
|
|
336
|
+
/** Seals one run log at completion with a final hash: the seal chains to the last entry hash and closes the log with no later append. */
|
|
337
|
+
export declare function sealrunlog(log: storedrunlog, now: number): Promise<{
|
|
338
|
+
log: storedrunlog;
|
|
339
|
+
seal: sealedlog;
|
|
340
|
+
}>;
|
|
341
|
+
/** Verifies the whole hash chain of one log at read time: every entry hash must chain to its predecessor and match its own body, so tampering with any summary, provenance or link stays detectable as tamper evidence. */
|
|
342
|
+
export declare function verifylogchain(entries: immutablelogentry[]): Promise<{
|
|
343
|
+
valid: boolean;
|
|
344
|
+
brokenat?: number;
|
|
345
|
+
reason: string;
|
|
346
|
+
}>;
|
|
347
|
+
/** Reads one run log only through chain verification: a verified chain returns its entries while a chain with a broken link refuses the read entirely. */
|
|
348
|
+
export declare function readverifiedlog(log: storedrunlog): Promise<{
|
|
349
|
+
ok: boolean;
|
|
350
|
+
entries: immutablelogentry[];
|
|
351
|
+
reason: string;
|
|
352
|
+
}>;
|
|
353
|
+
/** Reads the verification status of one stored run log for the panel: the chain validity, the entry count, the broken link when one exists and the seal hash at completion. */
|
|
354
|
+
export declare function chainreportof(log: storedrunlog): Promise<{
|
|
355
|
+
runid: string;
|
|
356
|
+
valid: boolean;
|
|
357
|
+
entries: number;
|
|
358
|
+
brokenat?: number;
|
|
359
|
+
reason: string;
|
|
360
|
+
sealhash?: string;
|
|
361
|
+
sealedat?: number;
|
|
362
|
+
}>;
|
|
363
|
+
/** Exports one run log as an audit record only after the chain verifies: the entries, the chain status and the seal hash travel together while a broken link refuses the export. */
|
|
364
|
+
export declare function exportlogchain(log: storedrunlog): Promise<{
|
|
365
|
+
runid: string;
|
|
366
|
+
entries: number;
|
|
367
|
+
chainvalid: boolean;
|
|
368
|
+
reason: string;
|
|
369
|
+
sealhash?: string;
|
|
370
|
+
sealedat?: number;
|
|
371
|
+
log: immutablelogentry[];
|
|
372
|
+
}>;
|
|
373
|
+
import type { phishverdict } from "./types.js";
|
|
374
|
+
/**
|
|
375
|
+
* Phishguard logic of the 1.1.62 family.
|
|
376
|
+
* The lookalike watch lives here: before a credential step runs on a new origin, the guard compares the login target against every granted origin and measures the lookalike distance between their host labels, so a lookalike origin that sits close to a granted origin under the user threshold blocks the step and the deny event names the matched known origin.
|
|
377
|
+
* The threshold stays the user's choice between zero and one with no engine default, and the distance reads the host label order from the registrable side so a padded subdomain never hides a lookalike.
|
|
378
|
+
*/
|
|
379
|
+
/** Reads whether one step is a login or credential step: the credential kind families and the field shapes that carry passwords, tokens and secrets mark the step for the phishguard watch. */
|
|
380
|
+
export declare function credentialstep(step: Pick<toolstep, "kind" | "target" | "value" | "options">): boolean;
|
|
381
|
+
/** Splits one origin into its host labels from the registrable side: the comparison reads com.example.pay from https://pay.example.com so the distance weighs the distinguishing labels first. */
|
|
382
|
+
export declare function originlabels(origin: string): string[];
|
|
383
|
+
/** Measures the normalized lookalike distance between two origins in the zero to one range: identical origins carry zero, and every label edit moves the distance toward one. */
|
|
384
|
+
export declare function lookalikedistance(one: string, two: string): number;
|
|
385
|
+
/** Validates the phishguard threshold as a user choice between zero and one: no engine default exists and the boundary the user picks stays the only block line. */
|
|
386
|
+
export declare function phishthresholdvalid(threshold: number): {
|
|
387
|
+
valid: boolean;
|
|
388
|
+
reason: string;
|
|
389
|
+
};
|
|
390
|
+
/** Renders one phishguard verdict for a login origin: the closest granted origin carries the distance, and a distance that crosses the user threshold blocks the step while the deny event names the matched known origin. */
|
|
391
|
+
export declare function phishverdictof(input: {
|
|
392
|
+
origin: string;
|
|
393
|
+
granted: string[];
|
|
394
|
+
threshold: number;
|
|
395
|
+
now: number;
|
|
396
|
+
}): phishverdict;
|
|
397
|
+
/** Reads whether one stored phishguard verdict stays inside its freshness window: a verdict past the window leaves the live set while its record survives for the audit trail. */
|
|
398
|
+
export declare function verdictfresh(verdict: phishverdict, now: number, freshness: number | undefined): boolean;
|
|
399
|
+
/** Builds the plain language phishguard notice the surfaces show before a login step: the verdict, the matched origin and the threshold in one line. */
|
|
400
|
+
export declare function phishnotetext(verdict: phishverdict): string;
|
|
401
|
+
import type { secretvaultentry } from "./types.js";
|
|
402
|
+
/**
|
|
403
|
+
* Secret vault logic of the 1.1.62 family.
|
|
404
|
+
* The vault seam lives here: secrets enter through put and leave through fetch at the last possible moment before a credential field, while the persisted records carry only the label, the exact origin scope, the profile workspace, the provenance and the sha-256 verification digest — no plaintext value ever reaches a storage writer, a log entry, a memory record or an export path.
|
|
405
|
+
* The scan paths refuse secrets in plain sight: a step option, a variable or a plan text whose value digests to a stored vault entry is a leak that refuses the plan, and a raw typed value behind a masked field shape never rides a step at all.
|
|
406
|
+
* Honest limit: the browser offers no vault hardware, so the seam rides the session storage area the background wires, which keeps values in memory only and never persists them to disk; the persistence layer stores metadata alone, mirroring the immutablelog seam honesty.
|
|
407
|
+
*/
|
|
408
|
+
/** The digest prefix every stored vault digest carries so raw values never persist anywhere. */
|
|
409
|
+
export declare const vaultdigestprefix = "sha256:";
|
|
410
|
+
/** Derives the sha-256 verification digest of one secret value through the platform crypto seam; the digest persists while the value never does. */
|
|
411
|
+
export declare function vaultdigestof(value: string): Promise<string>;
|
|
412
|
+
/** Builds one vault record from its metadata: the label, the exact origin scope, the profile workspace and the provenance; the digest verifies the value behind the seam without ever carrying it. */
|
|
413
|
+
export declare function vaultentryof(input: {
|
|
414
|
+
label: string;
|
|
415
|
+
scope: string;
|
|
416
|
+
profileid: string;
|
|
417
|
+
provenance: "user" | "session";
|
|
418
|
+
digest: string;
|
|
419
|
+
now: number;
|
|
420
|
+
vaultid?: string;
|
|
421
|
+
}): secretvaultentry;
|
|
422
|
+
/** Creates an in memory vault seam: values live in the map only, which is the honest fallback the background wraps with the session storage area that never persists to disk. */
|
|
423
|
+
export declare function inmemoryvault(): {
|
|
424
|
+
put(vaultid: string, value: string): Promise<void>;
|
|
425
|
+
fetch(vaultid: string): Promise<string | undefined>;
|
|
426
|
+
drop(vaultid: string): Promise<void>;
|
|
427
|
+
};
|
|
428
|
+
/** Stores one secret behind the vault seam and returns its metadata record alone: the value enters the seam and no return path carries it. */
|
|
429
|
+
export declare function vaultstore(input: {
|
|
430
|
+
seam: {
|
|
431
|
+
put(vaultid: string, value: string): Promise<void>;
|
|
432
|
+
};
|
|
433
|
+
label: string;
|
|
434
|
+
scope: string;
|
|
435
|
+
profileid: string;
|
|
436
|
+
provenance: "user" | "session";
|
|
437
|
+
value: string;
|
|
438
|
+
now: number;
|
|
439
|
+
}): Promise<secretvaultentry>;
|
|
440
|
+
/** Reads one secret from the vault seam at the last possible moment before its credential field: the value returns to the dispatching caller only, never to a log writer, and the record stamps its last use. */
|
|
441
|
+
export declare function vaultvaluefor(input: {
|
|
442
|
+
seam: {
|
|
443
|
+
fetch(vaultid: string): Promise<string | undefined>;
|
|
444
|
+
};
|
|
445
|
+
entry: secretvaultentry;
|
|
446
|
+
}): Promise<{
|
|
447
|
+
ok: boolean;
|
|
448
|
+
value?: string;
|
|
449
|
+
reason: string;
|
|
450
|
+
used?: secretvaultentry;
|
|
451
|
+
}>;
|
|
452
|
+
/** Drops one secret from the vault seam; the metadata record leaves with it because a deleted secret leaves no trace a surface could read. */
|
|
453
|
+
export declare function vaultdelete(input: {
|
|
454
|
+
seam: {
|
|
455
|
+
drop(vaultid: string): Promise<void>;
|
|
456
|
+
};
|
|
457
|
+
entry: secretvaultentry;
|
|
458
|
+
}): Promise<{
|
|
459
|
+
dropped: boolean;
|
|
460
|
+
label: string;
|
|
461
|
+
reason: string;
|
|
462
|
+
}>;
|
|
463
|
+
/** Reads whether one vault record covers an origin: the scope binds to exactly one origin, so a secret of one site never rides another site. */
|
|
464
|
+
export declare function vaultcovers(entry: secretvaultentry, origin: string): boolean;
|
|
465
|
+
/** Scans candidate step values, variables and plan texts for leaked secrets: a candidate whose sha-256 digest matches a stored vault digest is a leak the plan refuses, because a plaintext secret outside the vault never rides a step, a variable or a plan. */
|
|
466
|
+
export declare function secretleakscan(input: {
|
|
467
|
+
candidates: string[];
|
|
468
|
+
entries: secretvaultentry[];
|
|
469
|
+
}): Promise<{
|
|
470
|
+
leaks: string[];
|
|
471
|
+
reason: string;
|
|
472
|
+
}>;
|
|
473
|
+
/** Reads whether one step carries a raw typed value behind a masked field shape: a credential step names its vault label instead, because a raw password or token value never rides a step option. */
|
|
474
|
+
export declare function secretshapecarrying(step: Pick<toolstep, "kind" | "target" | "value" | "options">): {
|
|
475
|
+
carries: boolean;
|
|
476
|
+
reason: string;
|
|
477
|
+
};
|
|
478
|
+
/** Builds the vault view the surfaces render: the labels, scopes, provenance and last use times only, because no surface ever displays or exports a secret value. */
|
|
479
|
+
export declare function vaultview(entries: secretvaultentry[]): Array<{
|
|
480
|
+
vaultid: string;
|
|
481
|
+
label: string;
|
|
482
|
+
scope: string;
|
|
483
|
+
provenance: string;
|
|
484
|
+
createdat: number;
|
|
485
|
+
lastusedat?: number;
|
|
486
|
+
}>;
|
|
487
|
+
/** Builds the plain language prompt of one credential step: the label the vault carries, never the value. */
|
|
488
|
+
export declare function vaultprompttext(entry: secretvaultentry, origin: string): string;
|
|
489
|
+
import type { permdiffrecord, transparencygrant } from "./types.js";
|
|
490
|
+
/**
|
|
491
|
+
* Transparency logic of the 1.1.62 family.
|
|
492
|
+
* The transparencypage grammar lives here: every active grant reads as one row with its origin, scope and boundary, every consent window ever granted stays listed with its expiry even after it closed, the connectallow entries list with their senders, and the permdiff of each installed update records the added and removed permissions between two versions.
|
|
493
|
+
* The revoke actions stay one descriptor per grant row, because every listed grant revokes from the same page that shows it.
|
|
494
|
+
*/
|
|
495
|
+
/** Computes the permdiff between two permission versions: the permissions the new version added, the permissions it removed and the computed time; an unchanged set carries empty lists while the record still lands for the audit trail. */
|
|
496
|
+
export declare function permissiondiff(input: {
|
|
497
|
+
from: string[];
|
|
498
|
+
to: string[];
|
|
499
|
+
fromversion: string;
|
|
500
|
+
toversion: string;
|
|
501
|
+
now: number;
|
|
502
|
+
}): permdiffrecord;
|
|
503
|
+
/** Reads whether one permdiff record reports a change between its versions; an unchanged permission set still records for the audit trail. */
|
|
504
|
+
export declare function permdiffchanged(diff: permdiffrecord): boolean;
|
|
505
|
+
/** Builds the plain language summary of one permdiff record for the transparencypage. */
|
|
506
|
+
export declare function permdiffsummary(diff: permdiffrecord): string;
|
|
507
|
+
/** Builds the transparency grant rows of every active grant: each allowlist origin carries its profile workspace scope and its grant time, and each originprofile carries its per kind scope. */
|
|
508
|
+
export declare function transparencygrants(input: {
|
|
509
|
+
allowlist: automationallowlistentry[];
|
|
510
|
+
profiles: originprofile[];
|
|
511
|
+
}): transparencygrant[];
|
|
512
|
+
/** Builds the revoke action descriptor of one transparency grant row: every listed grant revokes from the same page that shows it. */
|
|
513
|
+
export declare function revokeaction(grant: transparencygrant): {
|
|
514
|
+
action: "revoke";
|
|
515
|
+
origin: string;
|
|
516
|
+
scope: string;
|
|
517
|
+
};
|
|
518
|
+
/** Lists every consent window ever granted with its expiry: closed windows stay listed beside the active ones because the transparency page shows the whole grant history. */
|
|
519
|
+
export declare function windowhistory(windows: consentwindow[]): Array<{
|
|
520
|
+
id: string;
|
|
521
|
+
origin: string;
|
|
522
|
+
state: string;
|
|
523
|
+
boundary: string;
|
|
524
|
+
startedat: number;
|
|
525
|
+
expiresat: number;
|
|
526
|
+
}>;
|
|
527
|
+
/** Lists the connectallow entries with their senders: the display names, the sender ids and the origin scopes the user allowed. */
|
|
528
|
+
export declare function connectallowlist(entries: connectallowentry[]): Array<{
|
|
529
|
+
senderid: string;
|
|
530
|
+
displayname: string;
|
|
531
|
+
origin?: string;
|
|
532
|
+
addedat: number;
|
|
533
|
+
}>;
|
|
534
|
+
//# sourceMappingURL=security.d.ts.map
|