@wenathlan/extension 1.1.43 → 1.1.45

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.
@@ -0,0 +1,122 @@
1
+ import type { consolediff, consoleentry, errorrecord, exchangerecord, loglevel, loglevelset, longtaskentry, netfailureentry, rejectionrecord, rotationrule, spamrule, stackframe, timelineentry, timelinesource } from "./types.js";
2
+ /**
3
+ * Run timeline logics for the 1.1.45 debugging family.
4
+ * Every correlated rule for console capture with reviewed depth bounds and secret redaction, stack frame parsing, error, rejection and resource failure capture, long task attribution windows, the timeline binding to one run and its step ids, spam collapse with reviewed thresholds, log rotation without entry loss, level and source filters, the blocking duration per step window and the console diff between two runs lives in this file.
5
+ * Console, error and task watching derives from page-injected listeners installed through the scripting api and the performance buffers, so no debugger permission exists anywhere in the manifest; redaction runs before any entry leaves the page bridge and captured text never carries reviewed secret patterns.
6
+ */
7
+ /** The debugging kinds, listed among the available capabilities of every proposal request. */
8
+ export declare const timelinekinds: string[];
9
+ /** The reviewed level set, ordered from the most severe to the most verbose level. */
10
+ export declare const loglevels: loglevel[];
11
+ /** The reviewed timeline source grammar: page console output, script errors, promise rejections, resource failures, long tasks and failed network requests. */
12
+ export declare const timelinesources: timelinesource[];
13
+ /** Ranks one level inside the reviewed level set; lower ranks are more severe. */
14
+ export declare function levelrank(level: loglevel): number;
15
+ /** Redacts reviewed secret patterns from console text before any entry leaves the page bridge; matched patterns never survive into a stored entry. */
16
+ export declare function redactconsoletext(text: string, patterns: string[]): string;
17
+ /** Classifies the kind tag of one console argument for the consoleentry argument kinds. */
18
+ export declare function argkind(value: unknown): string;
19
+ /** Serializes one console argument through the reviewed depth bound; deeper objects collapse to their constructor tag so the bound stays a user choice with no code ceiling. */
20
+ export declare function serializearg(value: unknown, depth: number): string;
21
+ /** Builds one captured console entry from a forwarded console call: the level, the redacted text of every serialized argument and the argument kinds, with redaction applied before the entry exists. */
22
+ export declare function consolecapture(input: {
23
+ level: loglevel;
24
+ args: unknown[];
25
+ depth: number;
26
+ redact: string[];
27
+ }): consoleentry;
28
+ /** Parses one stack trace text into stack frames with function names, urls, lines and columns; unparseable lines are skipped instead of crashing capture. */
29
+ export declare function stackframes(stacktext: string): stackframe[];
30
+ /** Builds one captured javascript error record body from an error event: the redacted message, the parsed stack frames, the source url and the line. */
31
+ export declare function errorcapture(input: {
32
+ message: string;
33
+ sourceurl: string;
34
+ line: number;
35
+ stacktext?: string;
36
+ redact: string[];
37
+ }): Pick<errorrecord, "message" | "frames" | "sourceurl" | "line">;
38
+ /** Builds one captured unhandled rejection record body from the rejection reason text and its stack frames, with the reason redacted before capture. */
39
+ export declare function rejectioncapture(input: {
40
+ reason: string;
41
+ stacktext?: string;
42
+ redact: string[];
43
+ }): Pick<rejectionrecord, "reason" | "frames">;
44
+ /** Builds the long task entry bodies of one watch window from performance longtask entries with their attribution names; the reviewed threshold filters entries below the user configured duration. */
45
+ export declare function longtaskcapture(input: {
46
+ entries: Array<{
47
+ starttime: number;
48
+ duration: number;
49
+ attributions: string[];
50
+ }>;
51
+ threshold: number;
52
+ }): Array<Pick<longtaskentry, "duration" | "starttime" | "attributions">>;
53
+ /** One run timeline bound to its run and step ids. */
54
+ export interface timeline {
55
+ runid: string;
56
+ origin: string;
57
+ stepids: string[];
58
+ attachedat: number;
59
+ entries: timelineentry[];
60
+ }
61
+ /** Binds one timeline to the run and its step ids; capture stays scoped to that run and every entry carries the run correlation id of its step. */
62
+ export declare function attachtimeline(input: {
63
+ runid: string;
64
+ origin: string;
65
+ stepids: string[];
66
+ now: number;
67
+ }): timeline;
68
+ /** Applies the reviewed level set to timeline entries: per step level floors drop entries more verbose than the floor and source filters drop entries from unreviewed sources. */
69
+ export declare function filterentries(entries: timelineentry[], levelset: loglevelset): timelineentry[];
70
+ /** Collapses repeated identical messages inside the reviewed spam window into counts and flags the patterns that exceed the reviewed collapse threshold. */
71
+ export declare function spamdetect(entries: timelineentry[], rule: spamrule): {
72
+ entries: Array<timelineentry & {
73
+ repeat: number;
74
+ }>;
75
+ flagged: Array<{
76
+ message: string;
77
+ count: number;
78
+ }>;
79
+ };
80
+ /** Rotates the timeline of one run: the newest entries stay inside the reviewed max entries window while every overflow entry moves to the rotation target store without data loss. */
81
+ export declare function rotatelogs(entries: timelineentry[], rule: rotationrule): {
82
+ kept: timelineentry[];
83
+ overflow: timelineentry[];
84
+ };
85
+ /** Counts the timeline entries per level for the response envelope timeline block. */
86
+ export declare function timelinecounts(entries: timelineentry[]): Record<string, number>;
87
+ /** Sums the blocking duration of long task entries inside one step window; the window stays a reviewed value with no code ceiling. */
88
+ export declare function blockingduration(tasks: Array<{
89
+ starttime: number;
90
+ duration: number;
91
+ }>, stepid: string, window: {
92
+ startedat: number;
93
+ endedat: number;
94
+ }): {
95
+ stepid: string;
96
+ blocking: number;
97
+ tasks: number;
98
+ };
99
+ /** Marks one failed request of the run in the timeline from its observed exchange: the url, status, error class and correlation id. */
100
+ export declare function netfailureentryof(input: {
101
+ id: string;
102
+ exchange: exchangerecord;
103
+ at: number;
104
+ }): netfailureentry | null;
105
+ /** Decides whether a watcher detached early because the run tab navigated inside its watch window: navigation timestamps inside the window detach the watcher at the navigation time. */
106
+ export declare function watcherdetached(input: {
107
+ startedat: number;
108
+ lifetime: number;
109
+ navigations: number[];
110
+ }): {
111
+ detached: boolean;
112
+ at?: number;
113
+ };
114
+ /** Compares the console output of two runs and classifies every line as added, removed or repeated; repeated lines carry their repeat counts. */
115
+ export declare function consolediff(input: {
116
+ baseid: string;
117
+ targetid: string;
118
+ baselines: string[];
119
+ targetlines: string[];
120
+ now: number;
121
+ }): consolediff;
122
+ //# sourceMappingURL=runtimeline.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"runtimeline.d.ts","sourceRoot":"","sources":["../runtimeline.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,YAAY,EAAE,WAAW,EAAE,cAAc,EAAE,QAAQ,EAAE,WAAW,EAAE,aAA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AAQ,EAAE,OAAO,CAAC;IAAC,EAAE,CAAC,EAAE,MAAM,CAAA;CAAE,CAKzI;AAED,iJAAiJ;AACjJ,wBAAgB,WAAW,CAAC,KAAK,EAAE;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,EAAE,CAAC;IAAC,WAAW,EAAE,MAAM,EAAE,CAAC;IAAC,GAAG,EAAE,MAAM,CAAA;CAAE,GAAG,WAAW,CA2B7I"}
package/dist/types.d.ts CHANGED
@@ -1,9 +1,9 @@
1
- export declare const protocolversion: "1.1.43";
1
+ export declare const protocolversion: "1.1.45";
2
2
  /** Every reviewed action kind. Read kinds observe, interaction kinds move focus, sensitive kinds change page or browser state. */
3
- export type actionkind = "observe" | "inspect" | "extract" | "wait" | "waitfor" | "waittext" | "readattribute" | "readstyle" | "readgeometry" | "readvalue" | "readtext" | "readhtml" | "countelements" | "readtable" | "readlinks" | "readimages" | "readmeta" | "readforms" | "readstorage" | "highlight" | "tablist" | "windowlist" | "tabsnapshot" | "focus" | "scroll" | "hover" | "clickdeep" | "rightclick" | "doubleclick" | "scrollpage" | "scrollby" | "scrollend" | "scrolltop" | "fullscreen" | "zoomset" | "click" | "type" | "navigate" | "select" | "presskey" | "drag" | "drop" | "upload" | "clear" | "check" | "uncheck" | "toggle" | "submit" | "reload" | "back" | "forward" | "writestorage" | "setattribute" | "removeattribute" | "evaluate" | "tabcreate" | "tabactivate" | "tabclose" | "tabreload" | "windowcreate" | "windowclose" | "windowresize" | "downloadfile" | "movepointer" | "clickpoint" | "shiftclick" | "clicktext" | "clickaria" | "clickname" | "resolvexpath" | "typetime" | "appendtext" | "setvalue" | "typeedit" | "keyhold" | "keyrelease" | "submitsearch" | "selectmulti" | "chooseradio" | "setslider" | "setdate" | "setcolor" | "expanddetails" | "dismissdialog" | "pierceshadow" | "enterframe" | "retryaction" | "mapclicks" | "verifyvisible" | "verifyenabled" | "a11ytree" | "readvisible" | "readertree" | "detectlists" | "detecttables" | "readjson" | "watchmutate" | "waitquiet" | "watchbanner" | "detectinfinitescroll" | "detectvirtual" | "detectlazy" | "readscrollpos" | "readlang" | "readoutline" | "countpages" | "listshadow" | "listframes" | "classifypage" | "fingerprintsection" | "diffsnapshots" | "readselection" | "watchfocus" | "detectsticky" | "detectscrolllock" | "readopengraph" | "detectlanguage" | "deriveselector" | "openlink" | "openprivate" | "reloadcache" | "stopnav" | "waitload" | "waiturl" | "followlink" | "spanav" | "spawait" | "rewritequery" | "setfragment" | "navlist" | "navprofile" | "detecthttp" | "readredirects" | "readfinalurl" | "handleauth" | "printpdf" | "prefetch" | "preconnect" | "deeplink" | "reopentab" | "trailaudit" | "pausenav" | "navintent" | "navrate" | "openclipboard" | "checksafe" | "batchopen" | "querytabs" | "duplicatetab" | "closepattern" | "pintab" | "mutetab" | "movetab" | "movetabwindow" | "grouptabs" | "colorgroup" | "collapsegroup" | "discardtab" | "reloadtabs" | "zoomin" | "zoomout" | "watchtab" | "switchtab" | "maximizewindow" | "minimizewindow" | "restorewindow" | "focuswindow" | "scratchwindow" | "incognitowindow" | "restoretab" | "savelayout" | "restorelayout" | "findclones" | "searchtabs" | "badgetab" | "attachmeta" | "listaudio" | "reopenrun" | "snapshotsession" | "fillform" | "filllabel" | "fillplaceholder" | "detectfields" | "generatevalues" | "saveprofiles" | "asksubmit" | "submitform" | "readerrors" | "retryform" | "runwizard" | "selectchain" | "picktypeahead" | "pickdate" | "attachfile" | "handoffcaptcha" | "fillcard" | "fillcode" | "consentpassword" | "skiphoneypot" | "detectlogin" | "detecttemplate" | "scrapetable" | "exportcsv" | "exportjson" | "exportexcel" | "copytable" | "pushsheets" | "importcsv" | "looprows" | "transformvalues" | "deduperows" | "paginateextract" | "mergepages" | "stamplerows" | "previewgrid" | "streamdisk" | "resumeextract" | "logprovenance" | "batchdownload" | "pausedownload" | "resumedownload" | "verifydownload" | "interceptmime" | "exportnetlog" | "readclipboard" | "writeclipboard" | "copyscreen" | "quarantinedownload" | "scanvirus" | "namecaptures" | "cleanupartifacts" | "shotview" | "shotfullpage" | "shotelement" | "shotregion" | "contactsheet" | "capturepdf" | "recordscreen" | "captureaudio" | "captureframe" | "downloadimages" | "shotcanvas" | "probestream" | "readmedia" | "readassets" | "timelapse" | "convertimage" | "makethumbs" | "fetchurl" | "parsejson" | "parsehtml" | "callrest" | "callgraphql" | "opensocket" | "sendmessage" | "waitmessage" | "watchrequests" | "readheaders" | "capturebodies" | "subscribesse" | "longpoll" | "mapapi" | "extractapi";
3
+ export type actionkind = "observe" | "inspect" | "extract" | "wait" | "waitfor" | "waittext" | "readattribute" | "readstyle" | "readgeometry" | "readvalue" | "readtext" | "readhtml" | "countelements" | "readtable" | "readlinks" | "readimages" | "readmeta" | "readforms" | "readstorage" | "highlight" | "tablist" | "windowlist" | "tabsnapshot" | "focus" | "scroll" | "hover" | "clickdeep" | "rightclick" | "doubleclick" | "scrollpage" | "scrollby" | "scrollend" | "scrolltop" | "fullscreen" | "zoomset" | "click" | "type" | "navigate" | "select" | "presskey" | "drag" | "drop" | "upload" | "clear" | "check" | "uncheck" | "toggle" | "submit" | "reload" | "back" | "forward" | "writestorage" | "setattribute" | "removeattribute" | "evaluate" | "tabcreate" | "tabactivate" | "tabclose" | "tabreload" | "windowcreate" | "windowclose" | "windowresize" | "downloadfile" | "movepointer" | "clickpoint" | "shiftclick" | "clicktext" | "clickaria" | "clickname" | "resolvexpath" | "typetime" | "appendtext" | "setvalue" | "typeedit" | "keyhold" | "keyrelease" | "submitsearch" | "selectmulti" | "chooseradio" | "setslider" | "setdate" | "setcolor" | "expanddetails" | "dismissdialog" | "pierceshadow" | "enterframe" | "retryaction" | "mapclicks" | "verifyvisible" | "verifyenabled" | "a11ytree" | "readvisible" | "readertree" | "detectlists" | "detecttables" | "readjson" | "watchmutate" | "waitquiet" | "watchbanner" | "detectinfinitescroll" | "detectvirtual" | "detectlazy" | "readscrollpos" | "readlang" | "readoutline" | "countpages" | "listshadow" | "listframes" | "classifypage" | "fingerprintsection" | "diffsnapshots" | "readselection" | "watchfocus" | "detectsticky" | "detectscrolllock" | "readopengraph" | "detectlanguage" | "deriveselector" | "openlink" | "openprivate" | "reloadcache" | "stopnav" | "waitload" | "waiturl" | "followlink" | "spanav" | "spawait" | "rewritequery" | "setfragment" | "navlist" | "navprofile" | "detecthttp" | "readredirects" | "readfinalurl" | "handleauth" | "printpdf" | "prefetch" | "preconnect" | "deeplink" | "reopentab" | "trailaudit" | "pausenav" | "navintent" | "navrate" | "openclipboard" | "checksafe" | "batchopen" | "querytabs" | "duplicatetab" | "closepattern" | "pintab" | "mutetab" | "movetab" | "movetabwindow" | "grouptabs" | "colorgroup" | "collapsegroup" | "discardtab" | "reloadtabs" | "zoomin" | "zoomout" | "watchtab" | "switchtab" | "maximizewindow" | "minimizewindow" | "restorewindow" | "focuswindow" | "scratchwindow" | "incognitowindow" | "restoretab" | "savelayout" | "restorelayout" | "findclones" | "searchtabs" | "badgetab" | "attachmeta" | "listaudio" | "reopenrun" | "snapshotsession" | "fillform" | "filllabel" | "fillplaceholder" | "detectfields" | "generatevalues" | "saveprofiles" | "asksubmit" | "submitform" | "readerrors" | "retryform" | "runwizard" | "selectchain" | "picktypeahead" | "pickdate" | "attachfile" | "handoffcaptcha" | "fillcard" | "fillcode" | "consentpassword" | "skiphoneypot" | "detectlogin" | "detecttemplate" | "scrapetable" | "exportcsv" | "exportjson" | "exportexcel" | "copytable" | "pushsheets" | "importcsv" | "looprows" | "transformvalues" | "deduperows" | "paginateextract" | "mergepages" | "stamplerows" | "previewgrid" | "streamdisk" | "resumeextract" | "logprovenance" | "batchdownload" | "pausedownload" | "resumedownload" | "verifydownload" | "interceptmime" | "exportnetlog" | "readclipboard" | "writeclipboard" | "copyscreen" | "quarantinedownload" | "scanvirus" | "namecaptures" | "cleanupartifacts" | "shotview" | "shotfullpage" | "shotelement" | "shotregion" | "contactsheet" | "capturepdf" | "recordscreen" | "captureaudio" | "captureframe" | "downloadimages" | "shotcanvas" | "probestream" | "readmedia" | "readassets" | "timelapse" | "convertimage" | "makethumbs" | "fetchurl" | "parsejson" | "parsehtml" | "callrest" | "callgraphql" | "opensocket" | "sendmessage" | "waitmessage" | "watchrequests" | "readheaders" | "capturebodies" | "subscribesse" | "longpoll" | "mapapi" | "extractapi" | "blockrequest" | "mockresponse" | "rewriteheaders" | "setcookies" | "readcookies" | "clearcookies" | "authflow" | "saveapikey" | "routeproxy" | "postform" | "postfiles" | "watchconsole" | "watcherrors" | "watchtasks";
4
4
  export type actionrisk = "read" | "interaction" | "sensitive";
5
5
  export type planstate = "draft" | "pending" | "approved" | "rejected" | "expired" | "completed" | "cancelled";
6
- export type auditkind = "configure" | "session" | "observe" | "proposal" | "approval" | "action" | "error" | "stop" | "pause" | "resume" | "complete" | "capability" | "tab" | "window" | "download" | "pointer" | "dialog" | "hold" | "retry" | "observation" | "watch" | "diff" | "navigation" | "redirect" | "auth" | "prefetch" | "rate" | "group" | "layout" | "discard" | "badge" | "fill" | "submit" | "consent" | "handoff" | "scrape" | "export" | "stream" | "provenance" | "resume" | "intercept" | "clipboard" | "quarantine" | "cleanup" | "capture" | "media" | "call" | "socket" | "replay";
6
+ export type auditkind = "configure" | "session" | "observe" | "proposal" | "approval" | "action" | "error" | "stop" | "pause" | "resume" | "complete" | "capability" | "tab" | "window" | "download" | "pointer" | "dialog" | "hold" | "retry" | "observation" | "watch" | "diff" | "navigation" | "redirect" | "auth" | "prefetch" | "rate" | "group" | "layout" | "discard" | "badge" | "fill" | "submit" | "consent" | "handoff" | "scrape" | "export" | "stream" | "provenance" | "resume" | "intercept" | "clipboard" | "quarantine" | "cleanup" | "capture" | "media" | "call" | "socket" | "replay" | "control" | "timeline";
7
7
  /** Observation mode classes: passive capture, watched lifetimes and diffing passes. */
8
8
  export type observationmode = "passive" | "watching" | "diffing";
9
9
  export interface toolstep {
@@ -110,6 +110,10 @@ export interface capabilityreport {
110
110
  http?: string[];
111
111
  /** Network observation part two kinds listed among the available capabilities: sockets, streams and page api observation stay behind the socket, watch and origin gates. */
112
112
  netwatch?: string[];
113
+ /** Network control kinds listed among the available capabilities: blocking, mocking, cookies, auth and uploads stay behind the block, cookie and proxy gates. */
114
+ control?: string[];
115
+ /** Debugging kinds listed among the available capabilities: console, error and task watching stays read only behind the timeline gate and the per origin console consent. */
116
+ debug?: string[];
113
117
  reportedat: number;
114
118
  }
115
119
  /** Structured result of one executed step, kept with configurable retention. */
@@ -148,6 +152,8 @@ export interface runsettings {
148
152
  capturepolicy?: capturepolicy;
149
153
  /** True when the pinned control tab with the live task feed stays open. */
150
154
  controltab?: boolean;
155
+ /** Retention window for stored run timeline entries; an absent window keeps every entry while the level count summaries always survive. */
156
+ timelineretention?: number;
151
157
  }
152
158
  export interface proposalrequest {
153
159
  objective: string;
@@ -1576,4 +1582,284 @@ export interface bodyrecord {
1576
1582
  /** True once the retention window expired the body; the metadata stays for the audit trail. */
1577
1583
  bodyexpired?: boolean;
1578
1584
  }
1585
+ /** One reviewed request block rule of a run: a url pattern with its origin, an optional resource type list and the run only scope; every rule reverts the moment the run ends, fails or is cancelled. */
1586
+ export interface blockrule {
1587
+ id: string;
1588
+ runid: string;
1589
+ stepid: string;
1590
+ /** Url pattern of the rule: an origin prefix with an optional path pattern. */
1591
+ urlpattern: string;
1592
+ /** Resource types the rule matches; an absent list matches every resource type. */
1593
+ resourcetypes?: string[];
1594
+ /** Hit counter of the rule while it stays active; extension initiated requests that matched were refused. */
1595
+ hits: number;
1596
+ registeredat: number;
1597
+ revertedat?: number;
1598
+ }
1599
+ /** One reviewed response mock fixture of a run: the served status, headers and body for matched urls, reviewed with its full body before it serves. */
1600
+ export interface mockspec {
1601
+ id: string;
1602
+ runid: string;
1603
+ stepid: string;
1604
+ /** Url pattern the fixture matches. */
1605
+ urlpattern: string;
1606
+ status: number;
1607
+ headers?: Record<string, string>;
1608
+ /** Reviewed body of the fixture, served verbatim for matched requests. */
1609
+ body?: string;
1610
+ /** Reference of a captured body of the 1.1.43 body store the fixture replays; the body resolves from the store and stays out of reports. */
1611
+ bodyref?: string;
1612
+ /** True once the user reviewed the fixture with its full body. */
1613
+ reviewed: boolean;
1614
+ /** Hit counter of the fixture while it stays active. */
1615
+ hits: number;
1616
+ registeredat: number;
1617
+ revertedat?: number;
1618
+ }
1619
+ /** One reviewed header rewrite rule of a run: the url pattern, header name, operation and value with the provenance of every applied rule kept in the audit trail. */
1620
+ export interface headerule {
1621
+ id: string;
1622
+ runid: string;
1623
+ stepid: string;
1624
+ /** Url pattern the rule matches; the pattern must name its origin explicitly. */
1625
+ urlpattern: string;
1626
+ name: string;
1627
+ operation: "set" | "append" | "remove";
1628
+ value?: string;
1629
+ /** Hit counter of the rule while it stays active. */
1630
+ hits: number;
1631
+ registeredat: number;
1632
+ revertedat?: number;
1633
+ }
1634
+ /** One reviewed cookie of a granted domain: name, domain, path, value and expiry, written through the page bridge of the granted origin and mirrored in storage with timestamps. */
1635
+ export interface cookierecord {
1636
+ name: string;
1637
+ domain: string;
1638
+ path: string;
1639
+ value: string;
1640
+ /** Expiry timestamp of the cookie; an absent expiry keeps a session cookie. */
1641
+ expiresat?: number;
1642
+ }
1643
+ /** One stored cookie operation of a run: the write, read or clear of one cookie of a granted domain with its timestamp; values never enter the audit trail. */
1644
+ export interface cookieoperation {
1645
+ id: string;
1646
+ runid: string;
1647
+ stepid: string;
1648
+ kind: "write" | "read" | "clear";
1649
+ domain: string;
1650
+ names: string[];
1651
+ at: number;
1652
+ }
1653
+ /** One reviewed external oauth flow: provider, authorize url, token url, scopes and the redirect origin the code capture watches. */
1654
+ export interface oauthflow {
1655
+ provider: string;
1656
+ authorizeurl: string;
1657
+ tokenurl: string;
1658
+ scopes: string[];
1659
+ redirectorigin: string;
1660
+ }
1661
+ /** One stored token record of a provider: scopes, origin scope and expiry with the token ids behind storage ids; token values never persist in the record or the audit trail. */
1662
+ export interface tokenrecord {
1663
+ id: string;
1664
+ provider: string;
1665
+ origin: string;
1666
+ scopes: string[];
1667
+ /** Storage id of the access token secret; the value stays behind the storage id. */
1668
+ accessstorageid: string;
1669
+ /** Storage id of the refresh token secret when the flow returned one. */
1670
+ refreshstorageid?: string;
1671
+ expiresat: number;
1672
+ refreshedat?: number;
1673
+ revokedat?: number;
1674
+ at: number;
1675
+ }
1676
+ /** One stored api key entry: name, origin scope, header name and created time with the last use timestamp; the key material stays behind its storage id. */
1677
+ export interface apikeyentry {
1678
+ name: string;
1679
+ origins: string[];
1680
+ header: string;
1681
+ storageid: string;
1682
+ createdat: number;
1683
+ lastuse?: number;
1684
+ }
1685
+ /** One reviewed proxy route of a run: scheme, host, port and the bypass list of origins that stay direct; the route applies for the run only and restores the previous state at run end. */
1686
+ export interface proxyroute {
1687
+ id: string;
1688
+ runid: string;
1689
+ stepid: string;
1690
+ scheme: "http" | "https" | "socks4" | "socks5";
1691
+ host: string;
1692
+ port: number;
1693
+ /** Origins that bypass the route and send direct; a non-empty list is required before the route applies. */
1694
+ bypass: string[];
1695
+ appliedat: number;
1696
+ revertedat?: number;
1697
+ }
1698
+ /** One parsed rate limit read of a response: remaining, limit, reset time and origin; the state expires at its reset window. */
1699
+ export interface ratelimitread {
1700
+ origin: string;
1701
+ remaining?: number;
1702
+ limit?: number;
1703
+ /** Reset timestamp of the window in epoch milliseconds. */
1704
+ resetat: number;
1705
+ at: number;
1706
+ }
1707
+ /** One reviewed urlencoded form payload of a postform step: the field list and its urlencoded encoding. */
1708
+ export interface formpayload {
1709
+ url: string;
1710
+ fields: Array<{
1711
+ name: string;
1712
+ value: string;
1713
+ }>;
1714
+ }
1715
+ /** One reviewed multipart upload payload of a postfiles step: the field list, the reviewed files and the boundary that streams the parts without buffering the whole payload. */
1716
+ export interface multipartpayload {
1717
+ url: string;
1718
+ fields: Array<{
1719
+ name: string;
1720
+ value: string;
1721
+ }>;
1722
+ /** Reviewed files of the upload; every file carries the explicit reviewed flag. */
1723
+ files: Array<{
1724
+ name: string;
1725
+ filename: string;
1726
+ mime: string;
1727
+ content: string;
1728
+ reviewed: boolean;
1729
+ }>;
1730
+ boundary?: string;
1731
+ }
1732
+ /** One reviewed token revocation rule: the token ids, the reason and the revoke time. */
1733
+ export interface revocationrule {
1734
+ tokenids: string[];
1735
+ reason: string;
1736
+ revokedat: number;
1737
+ }
1738
+ /** Console and timeline levels of the reviewed level set, ordered from the most severe to the most verbose. */
1739
+ export type loglevel = "error" | "warn" | "info" | "log" | "debug" | "trace";
1740
+ /** One timeline source of the reviewed source grammar: page console output, script errors, promise rejections, resource failures, long tasks and failed network requests. */
1741
+ export type timelinesource = "console" | "error" | "rejection" | "resource" | "longtask" | "network";
1742
+ /** One run timeline entry: the time, level, source, step id, message and the run correlation id of its step. */
1743
+ export interface timelineentry {
1744
+ id: string;
1745
+ runid: string;
1746
+ stepid: string;
1747
+ time: number;
1748
+ level: loglevel;
1749
+ source: timelinesource;
1750
+ message: string;
1751
+ /** Repeat count after spam collapse collapsed identical messages into one entry. */
1752
+ repeat?: number;
1753
+ }
1754
+ /** One captured console call: the level, the redacted text, the argument kinds and the repeat count. */
1755
+ export interface consoleentry {
1756
+ level: loglevel;
1757
+ text: string;
1758
+ /** Kind tags of the serialized arguments, for example string, number, boolean, object or array. */
1759
+ argkinds: string[];
1760
+ repeat: number;
1761
+ }
1762
+ /** One stack frame of a captured error or rejection: the function name, the source url, the line and the column. */
1763
+ export interface stackframe {
1764
+ functionname?: string;
1765
+ url: string;
1766
+ line: number;
1767
+ column?: number;
1768
+ }
1769
+ /** One captured javascript error: the message, the stack frames, the source url and the line. */
1770
+ export interface errorrecord {
1771
+ id: string;
1772
+ runid: string;
1773
+ stepid: string;
1774
+ message: string;
1775
+ frames: stackframe[];
1776
+ sourceurl: string;
1777
+ line: number;
1778
+ at: number;
1779
+ }
1780
+ /** One captured unhandled promise rejection: the reason text and the stack frames. */
1781
+ export interface rejectionrecord {
1782
+ id: string;
1783
+ runid: string;
1784
+ stepid: string;
1785
+ reason: string;
1786
+ frames: stackframe[];
1787
+ at: number;
1788
+ }
1789
+ /** One failed request of the run marked in the timeline: the url, status, error class and the correlation id. */
1790
+ export interface netfailureentry {
1791
+ id: string;
1792
+ runid: string;
1793
+ stepid: string;
1794
+ url: string;
1795
+ status: number;
1796
+ errorclass: string;
1797
+ correlationid: string;
1798
+ at: number;
1799
+ }
1800
+ /** One captured long task timing: the duration, the start time and the attribution names. */
1801
+ export interface longtaskentry {
1802
+ id: string;
1803
+ runid: string;
1804
+ stepid: string;
1805
+ duration: number;
1806
+ starttime: number;
1807
+ attributions: string[];
1808
+ at: number;
1809
+ }
1810
+ /** One reviewed spam rule: the pattern, the window size and the collapse threshold; every bound stays a user configured value with no code ceiling. */
1811
+ export interface spamrule {
1812
+ pattern: string;
1813
+ windowsize: number;
1814
+ collapse: number;
1815
+ }
1816
+ /** One reviewed level set: per step level floors and source filters over the reviewed source grammar. */
1817
+ export interface loglevelset {
1818
+ floors?: Record<string, loglevel>;
1819
+ sources?: timelinesource[];
1820
+ }
1821
+ /** One reviewed log rotation rule: the max entries kept per run and the overflow target store; the entry count stays a user configured value with no code ceiling. */
1822
+ export interface rotationrule {
1823
+ maxentries: number;
1824
+ overflowtarget: string;
1825
+ }
1826
+ /** One classified console line of a consolediff: added, removed or repeated, with the repeat count of repeated lines. */
1827
+ export interface consoleline {
1828
+ kind: "added" | "removed" | "repeated";
1829
+ text: string;
1830
+ count?: number;
1831
+ }
1832
+ /** One console diff result between two runs: the added, removed and repeated line classes with their counts. */
1833
+ export interface consolediff {
1834
+ base: string;
1835
+ target: string;
1836
+ lines: consoleline[];
1837
+ added: number;
1838
+ removed: number;
1839
+ repeated: number;
1840
+ at: number;
1841
+ }
1842
+ /** One console capture consent decision persisted per origin; console watching on a new origin prompts once and the approved decision persists. */
1843
+ export interface consoleconsentrecord {
1844
+ id: string;
1845
+ prompt: string;
1846
+ origin: string;
1847
+ stepid: string;
1848
+ approved?: boolean;
1849
+ usedat?: number;
1850
+ at: number;
1851
+ }
1852
+ /** One log rotation target record with the overflow entry counts moved out of the rolling window. */
1853
+ export interface rotationtargetrecord {
1854
+ target: string;
1855
+ runid: string;
1856
+ entries: number;
1857
+ at: number;
1858
+ }
1859
+ /** One run timeline level count summary that survives the entry retention window. */
1860
+ export interface levelsummary {
1861
+ runid: string;
1862
+ counts: Record<string, number>;
1863
+ at: number;
1864
+ }
1579
1865
  //# sourceMappingURL=types.d.ts.map