@wenathlan/extension 1.1.48 → 1.1.50
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/README.md +7 -5
- package/dist/index.d.ts +3 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1341 -5
- package/dist/index.js.map +4 -4
- package/dist/memory.d.ts +79 -1
- package/dist/memory.d.ts.map +1 -1
- package/dist/policy.d.ts +45 -1
- package/dist/policy.d.ts.map +1 -1
- package/dist/protocol.d.ts +98 -2
- package/dist/protocol.d.ts.map +1 -1
- package/dist/sessions.d.ts +79 -0
- package/dist/sessions.d.ts.map +1 -0
- package/dist/types.d.ts +297 -3
- package/dist/types.d.ts.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/workflow.d.ts +148 -0
- package/dist/workflow.d.ts.map +1 -0
- package/extension/dist/background.js +2025 -48
- package/extension/dist/background.js.map +4 -4
- package/extension/dist/manifest.json +1 -1
- package/extension/dist/pagebridge.js +2 -2
- package/extension/dist/pagebridge.js.map +2 -2
- package/extension/dist/popup.html +1 -1
- package/extension/dist/popup.js +56 -2
- package/extension/dist/popup.js.map +2 -2
- package/extension/dist/sidepanel.html +1 -1
- package/extension/dist/sidepanel.js +392 -2
- package/extension/dist/sidepanel.js.map +3 -3
- package/extension/dist/style.css +2 -0
- package/extension/manifest.json +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import type { autointerval, restoreplan, searchfield, searchquery, sessionchange, sessiondiff, sessionfile, sessionfolder, sessionmatch, sessionrecord, sessiontab, snapshotscope, snapshotplan, stepoutcome, taskstate } from "./types.js";
|
|
2
|
+
/** The session kinds of the 1.1.49 memory family: task state persistence, session capture, restore, naming, diffing, search, export and import. */
|
|
3
|
+
export declare const sessionkinds: string[];
|
|
4
|
+
/** The format version of exported session files; imports of unknown versions are refused. */
|
|
5
|
+
export declare const sessionfileversion = 1;
|
|
6
|
+
/** The reviewed snapshot section toggles: tabs, scroll positions, form state, local storage and cookies. */
|
|
7
|
+
export declare const snapshotsections: snapshotscope[];
|
|
8
|
+
/** The searchable fields of a session search: urls, titles, record names and captured text. */
|
|
9
|
+
export declare const searchfields: searchfield[];
|
|
10
|
+
/** Checksums the run id, step cursor and recorded outputs of a task state so corruption is detected before a resume. */
|
|
11
|
+
export declare function taskstatechecksum(runid: string, stepcursor: number, outputs: stepoutcome[]): string;
|
|
12
|
+
/** Builds one persisted task state checkpoint of a run with its checksum. */
|
|
13
|
+
export declare function taskstateof(input: {
|
|
14
|
+
runid: string;
|
|
15
|
+
stepcursor: number;
|
|
16
|
+
outputs: stepoutcome[];
|
|
17
|
+
checkpointat: number;
|
|
18
|
+
}): taskstate;
|
|
19
|
+
/** True when a persisted task state carries the intact checksum of its own payload; a corrupted checkpoint never resumes. */
|
|
20
|
+
export declare function taskstatevalid(state: taskstate | undefined): boolean;
|
|
21
|
+
/** Normalizes one captured tab of a saved session: url, title, index, scroll position and form state. */
|
|
22
|
+
export declare function sessiontabof(value: unknown): sessiontab | undefined;
|
|
23
|
+
/** Normalizes one reviewed auto snapshot interval: a positive period, a positive maximum snapshot count and a zero or positive expiry window; every value stays a user choice with no code ceiling. */
|
|
24
|
+
export declare function autointervalof(value: unknown): autointerval | undefined;
|
|
25
|
+
/** Normalizes one reviewed snapshot plan: the scope, the section toggles of the reviewed grammar, the capture link flag and the optional auto interval. */
|
|
26
|
+
export declare function snapshotplanof(value: unknown): snapshotplan | undefined;
|
|
27
|
+
/** Normalizes one reviewed restore plan: the tab, form and capture policies of the reviewed grammar. */
|
|
28
|
+
export declare function restoreplanof(value: unknown): restoreplan | undefined;
|
|
29
|
+
/** Normalizes one reviewed session search query: the non-empty term list, the searched fields of the reviewed grammar and the optional time window. */
|
|
30
|
+
export declare function searchqueryof(value: unknown): searchquery | undefined;
|
|
31
|
+
/** Normalizes one session folder: the name, the optional parent folder and the tag list. */
|
|
32
|
+
export declare function sessionfolderof(value: unknown): sessionfolder | undefined;
|
|
33
|
+
/** Builds one saved session record with its default tag list and capture linkage. */
|
|
34
|
+
export declare function newsessionrecord(input: {
|
|
35
|
+
id: string;
|
|
36
|
+
name: string;
|
|
37
|
+
createdat: number;
|
|
38
|
+
tabs: sessiontab[];
|
|
39
|
+
captures: string[];
|
|
40
|
+
storage: Array<{
|
|
41
|
+
origin: string;
|
|
42
|
+
keys: string[];
|
|
43
|
+
values: string[];
|
|
44
|
+
}>;
|
|
45
|
+
cookies: Array<{
|
|
46
|
+
origin: string;
|
|
47
|
+
names: string[];
|
|
48
|
+
}>;
|
|
49
|
+
auto?: boolean;
|
|
50
|
+
folder?: string;
|
|
51
|
+
tags?: string[];
|
|
52
|
+
}): sessionrecord;
|
|
53
|
+
/** Classifies the tab, url, form and storage changes between two saved sessions by matching tabs on their recorded index. */
|
|
54
|
+
export declare function diffsessionrecords(left: sessionrecord, right: sessionrecord): sessionchange[];
|
|
55
|
+
/** Builds one stored session diff result of two compared records. */
|
|
56
|
+
export declare function newsessiondiff(input: {
|
|
57
|
+
id: string;
|
|
58
|
+
left: sessionrecord;
|
|
59
|
+
right: sessionrecord;
|
|
60
|
+
at: number;
|
|
61
|
+
}): sessiondiff;
|
|
62
|
+
/** Searches across saved sessions: matches urls, titles, record names and captured form text inside the reviewed time window and returns every match with its session id. */
|
|
63
|
+
export declare function searchsessionrecords(query: searchquery, records: sessionrecord[]): sessionmatch[];
|
|
64
|
+
/** Packs saved session records into one versioned session file with its record ids, byte size and checksum. */
|
|
65
|
+
export declare function exportsessionfile(records: sessionrecord[], now: number): sessionfile;
|
|
66
|
+
/** Validates one imported session file: the format version must match, every record must carry intact sections and the checksum must verify before any record review begins. */
|
|
67
|
+
export declare function importsessionfile(value: unknown): sessionfile | undefined;
|
|
68
|
+
/** Expires the heavy sections of saved sessions after the reviewed retention window while the record metadata survives; an absent window keeps every section and no code ceiling applies. */
|
|
69
|
+
export declare function expiresessions(records: sessionrecord[], retention: number | undefined, now: number): sessionrecord[];
|
|
70
|
+
/** Lists saved sessions filtered by name substring, folder and time window; the filter stays a user choice with no result cap. */
|
|
71
|
+
export declare function filteredsessions(records: sessionrecord[], filter: {
|
|
72
|
+
name?: string;
|
|
73
|
+
folder?: string;
|
|
74
|
+
from?: number;
|
|
75
|
+
to?: number;
|
|
76
|
+
}): sessionrecord[];
|
|
77
|
+
/** Marks one persisted task state interrupted by a browser restart when the cursor never reached the end of the plan. */
|
|
78
|
+
export declare function crashinterrupted(state: taskstate | undefined, plansteps: number, now: number): taskstate | undefined;
|
|
79
|
+
//# sourceMappingURL=sessions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sessions.d.ts","sourceRoot":"","sources":["../sessions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,WAAW,EAAE,WAAW,EAAE,WAAW,EAAE,aAAa,EAAE,WAAW,EAAE,WAAW,EAAE,aAAa,EAAE,YAAY,EAAE,aAAa,EAAE,UAAU,EAAE,aAAa,EAAE,YAAY,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAE5O,mJAAmJ;AACnJ,eAAO,MAAM,YAAY,EAAE,MAAM,EAAgJ,CAAC;AAElL,6FAA6F;AAC7F,eAAO,MAAM,kBAAkB,IAAI,CAAC;AAEpC,4GAA4G;AAC5G,eAAO,MAAM,gBAAgB,EAAE,aAAa,EAAsD,CAAC;AAEnG,+FAA+F;AAC/F,eAAO,MAAM,YAAY,EAAE,WAAW,EAAwC,CAAC;AAY/E,wHAAwH;AACxH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,OAAO,EAAE,WAAW,EAAE,GAAG,MAAM,CAEnG;AAED,6EAA6E;AAC7E,wBAAgB,WAAW,CAAC,KAAK,EAAE;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,UAAU,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,WAAW,EAAE,CAAC;IAAC,YAAY,EA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GAAG,SAAS,CAIpH"}
|
package/dist/types.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
export declare const protocolversion: "1.1.
|
|
1
|
+
export declare const protocolversion: "1.1.50";
|
|
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" | "blockrequest" | "mockresponse" | "rewriteheaders" | "setcookies" | "readcookies" | "clearcookies" | "authflow" | "saveapikey" | "routeproxy" | "postform" | "postfiles" | "watchconsole" | "watcherrors" | "watchtasks" | "attachcdp" | "detachcdp" | "cdpcmd" | "watchcdp" | "setbreakpoint" | "stepcode" | "watchexpr" | "overridescript" | "measureflow" | "heapshot" | "trackmemory" | "profilecpu" | "watchshifts" | "traceload" | "annotatetrace" | "replaytrace" | "capturesourcemaps" | "emulatedevice" | "emulatenetwork" | "emulatelocate" | "setuseragent" | "overridepermission" | "blackboxscripts";
|
|
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" | "attachcdp" | "detachcdp" | "cdpcmd" | "watchcdp" | "setbreakpoint" | "stepcode" | "watchexpr" | "overridescript" | "measureflow" | "heapshot" | "trackmemory" | "profilecpu" | "watchshifts" | "traceload" | "annotatetrace" | "replaytrace" | "capturesourcemaps" | "emulatedevice" | "emulatenetwork" | "emulatelocate" | "setuseragent" | "overridepermission" | "blackboxscripts" | "persiststate" | "capturesession" | "restoresession" | "namedsessions" | "diffsessions" | "searchsessions" | "exportsessions" | "importsessions" | "composeworkflow" | "savetemplate" | "runworkflow" | "dryrun" | "delay" | "waitelement" | "compute" | "extractvars";
|
|
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" | "control" | "timeline" | "debugger" | "profile" | "emulation";
|
|
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" | "debugger" | "profile" | "emulation" | "workflow";
|
|
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 {
|
|
@@ -112,12 +112,16 @@ export interface capabilityreport {
|
|
|
112
112
|
netwatch?: string[];
|
|
113
113
|
/** Network control kinds listed among the available capabilities: blocking, mocking, cookies, auth and uploads stay behind the block, cookie and proxy gates. */
|
|
114
114
|
control?: string[];
|
|
115
|
+
/** Session memory kinds listed among the available capabilities: persistence, capture, restore, naming, diffing, search, export and import stay behind the session consent gates. */
|
|
116
|
+
sessions?: string[];
|
|
115
117
|
/** 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
118
|
debug?: string[];
|
|
117
119
|
/** Profiling kinds listed among the available capabilities: flow, heap, cpu, shift, trace and source map instruments stay behind the profiling target gate and the per origin consents. */
|
|
118
120
|
profile?: string[];
|
|
119
121
|
/** Emulation kinds listed among the available capabilities: device, network, location, agent and permission layers plus blackbox trace shaping stay behind the emulation gate and the per origin location consent. */
|
|
120
122
|
emulation?: string[];
|
|
123
|
+
/** Workflow kinds listed among the available capabilities: composition, templates, runs, dry runs, delays, element waits, expressions and variable extraction stay inside the plan review gates. */
|
|
124
|
+
workflow?: string[];
|
|
121
125
|
reportedat: number;
|
|
122
126
|
}
|
|
123
127
|
/** Structured result of one executed step, kept with configurable retention. */
|
|
@@ -168,6 +172,10 @@ export interface runsettings {
|
|
|
168
172
|
breakpointceiling?: number;
|
|
169
173
|
/** Retention window for stored reverted emulation layer states; an absent window keeps every prior state while the layer history itself always survives. */
|
|
170
174
|
emulationretention?: number;
|
|
175
|
+
/** Retention window for stored session record sections such as tab form state, local storage and cookies; an absent window keeps every section while the record metadata always survives and the value stays a user choice with no code ceiling. */
|
|
176
|
+
sessionretention?: number;
|
|
177
|
+
/** Retention window for stored workflow runlog entries; an absent window keeps every entry while the run summaries always survive for the audit trail. */
|
|
178
|
+
runlogretention?: number;
|
|
171
179
|
}
|
|
172
180
|
export interface proposalrequest {
|
|
173
181
|
objective: string;
|
|
@@ -2234,4 +2242,290 @@ export interface presetlibrary {
|
|
|
2234
2242
|
agents: agentpreset[];
|
|
2235
2243
|
exportedat: number;
|
|
2236
2244
|
}
|
|
2245
|
+
/** The persisted task state of one run: the run id, the step cursor of the last completed step, the recorded outputs and the last checkpoint time; the checksum detects corruption before a resume. */
|
|
2246
|
+
export interface taskstate {
|
|
2247
|
+
runid: string;
|
|
2248
|
+
stepcursor: number;
|
|
2249
|
+
outputs: stepoutcome[];
|
|
2250
|
+
checkpointat: number;
|
|
2251
|
+
/** Checksum of the run id, step cursor and outputs so a corrupted checkpoint never resumes. */
|
|
2252
|
+
checksum: string;
|
|
2253
|
+
/** True once a service worker or browser restart interrupted the run before the cursor reached the end. */
|
|
2254
|
+
interrupted?: boolean;
|
|
2255
|
+
/** Time the interrupted run was detected, set by the crash detector after a browser restart. */
|
|
2256
|
+
crashat?: number;
|
|
2257
|
+
}
|
|
2258
|
+
/** One session history event of the run: the event kind, the time, the tab id and the detail; every session event lands in the history with its timestamp. */
|
|
2259
|
+
export interface sessionevent {
|
|
2260
|
+
id: string;
|
|
2261
|
+
kind: "persist" | "capture" | "restore" | "name" | "diff" | "search" | "export" | "import" | "auto" | "crash" | "resume" | "restart";
|
|
2262
|
+
at: number;
|
|
2263
|
+
tabid?: number;
|
|
2264
|
+
detail: string;
|
|
2265
|
+
}
|
|
2266
|
+
/** One captured tab of a saved session: the url, title, index, scroll position and the form state captured through the page seam. */
|
|
2267
|
+
export interface sessiontab {
|
|
2268
|
+
url: string;
|
|
2269
|
+
title: string;
|
|
2270
|
+
index: number;
|
|
2271
|
+
scrollx: number;
|
|
2272
|
+
scrolly: number;
|
|
2273
|
+
forms: Array<{
|
|
2274
|
+
selector: string;
|
|
2275
|
+
value: string;
|
|
2276
|
+
}>;
|
|
2277
|
+
}
|
|
2278
|
+
/** One saved browsing session record: the id, the reviewed name, the created time, the captured tabs and the linked capture records. */
|
|
2279
|
+
export interface sessionrecord {
|
|
2280
|
+
id: string;
|
|
2281
|
+
name: string;
|
|
2282
|
+
createdat: number;
|
|
2283
|
+
tabs: sessiontab[];
|
|
2284
|
+
/** Capture record ids of the run linked to this session. */
|
|
2285
|
+
captures: string[];
|
|
2286
|
+
/** Local storage keys captured per granted origin. */
|
|
2287
|
+
storage: Array<{
|
|
2288
|
+
origin: string;
|
|
2289
|
+
keys: string[];
|
|
2290
|
+
values: string[];
|
|
2291
|
+
}>;
|
|
2292
|
+
/** Cookie names captured per granted origin; values stay on the page seam. */
|
|
2293
|
+
cookies: Array<{
|
|
2294
|
+
origin: string;
|
|
2295
|
+
names: string[];
|
|
2296
|
+
}>;
|
|
2297
|
+
/** Folder name the record was filed under by a namedsessions step. */
|
|
2298
|
+
folder?: string;
|
|
2299
|
+
/** Tag list of the reviewed filing. */
|
|
2300
|
+
tags: string[];
|
|
2301
|
+
/** True when an auto snapshot interval produced the record instead of a reviewed capture step. */
|
|
2302
|
+
auto?: boolean;
|
|
2303
|
+
/** True once the retention window expired the heavy tab, storage and cookie sections while the record metadata survives. */
|
|
2304
|
+
sectionsexpired?: boolean;
|
|
2305
|
+
/** True once the record was restored so the sessions view marks it with the restored badge. */
|
|
2306
|
+
restoredat?: number;
|
|
2307
|
+
}
|
|
2308
|
+
/** The reviewed section toggles of a session snapshot: tabs, scroll positions, form state, local storage and cookies; every toggle stays a user choice. */
|
|
2309
|
+
export type snapshotscope = "tabs" | "scroll" | "forms" | "storage" | "cookies";
|
|
2310
|
+
/** The reviewed snapshot plan of a session capture: the scope, the section toggles, the capture link flag and the optional auto snapshot interval. */
|
|
2311
|
+
export interface snapshotplan {
|
|
2312
|
+
scope: "tab" | "run" | "all";
|
|
2313
|
+
sections: snapshotscope[];
|
|
2314
|
+
captures: boolean;
|
|
2315
|
+
auto?: autointerval;
|
|
2316
|
+
}
|
|
2317
|
+
/** The reviewed restore plan of a session restore: the tab, form and capture policies the reviewed restore follows. */
|
|
2318
|
+
export interface restoreplan {
|
|
2319
|
+
tabpolicy: "reopen" | "skip";
|
|
2320
|
+
formpolicy: "restore" | "skip";
|
|
2321
|
+
capturepolicy: "link" | "skip";
|
|
2322
|
+
}
|
|
2323
|
+
/** The reviewed auto snapshot interval: the period, the maximum snapshot count and the expiry window; every value stays a user choice with no code ceiling. */
|
|
2324
|
+
export interface autointerval {
|
|
2325
|
+
period: number;
|
|
2326
|
+
maxsnapshots: number;
|
|
2327
|
+
expiry: number;
|
|
2328
|
+
}
|
|
2329
|
+
/** One session folder of the library: the name, the optional parent folder and the tag list. */
|
|
2330
|
+
export interface sessionfolder {
|
|
2331
|
+
name: string;
|
|
2332
|
+
parent?: string;
|
|
2333
|
+
tags: string[];
|
|
2334
|
+
}
|
|
2335
|
+
/** One classified change of a session diff: the change class and the tab, url, form or storage subject with its detail. */
|
|
2336
|
+
export interface sessionchange {
|
|
2337
|
+
class: "added" | "removed" | "changed";
|
|
2338
|
+
subject: "tab" | "url" | "form" | "storage";
|
|
2339
|
+
detail: string;
|
|
2340
|
+
}
|
|
2341
|
+
/** One session diff result: the two compared record ids, the classified changes and the diff time; stored for later review. */
|
|
2342
|
+
export interface sessiondiff {
|
|
2343
|
+
id: string;
|
|
2344
|
+
leftid: string;
|
|
2345
|
+
rightid: string;
|
|
2346
|
+
changes: sessionchange[];
|
|
2347
|
+
at: number;
|
|
2348
|
+
}
|
|
2349
|
+
/** The searchable fields of a session search: urls, titles, record names and captured text. */
|
|
2350
|
+
export type searchfield = "urls" | "titles" | "names" | "text";
|
|
2351
|
+
/** One reviewed session search query: the term list, the searched fields and the optional time window. */
|
|
2352
|
+
export interface searchquery {
|
|
2353
|
+
terms: string[];
|
|
2354
|
+
fields: searchfield[];
|
|
2355
|
+
from?: number;
|
|
2356
|
+
to?: number;
|
|
2357
|
+
}
|
|
2358
|
+
/** One session search match: the session id, the matched field, the matched term and the record time window. */
|
|
2359
|
+
export interface sessionmatch {
|
|
2360
|
+
sessionid: string;
|
|
2361
|
+
field: searchfield;
|
|
2362
|
+
term: string;
|
|
2363
|
+
at: number;
|
|
2364
|
+
excerpt: string;
|
|
2365
|
+
}
|
|
2366
|
+
/** One exported session file: the format version, the packed records, the record ids, the byte size and the checksum verified at import; every record is reviewed before an import adds it. */
|
|
2367
|
+
export interface sessionfile {
|
|
2368
|
+
formatversion: number;
|
|
2369
|
+
records: sessionrecord[];
|
|
2370
|
+
recordids: string[];
|
|
2371
|
+
bytesize: number;
|
|
2372
|
+
checksum: string;
|
|
2373
|
+
exportedat: number;
|
|
2374
|
+
}
|
|
2375
|
+
/** One provenance entry of a workflow run: an expression result or a regex capture with its name, value and time, stored for inspection after the run. */
|
|
2376
|
+
export interface workflowprovenance {
|
|
2377
|
+
runid: string;
|
|
2378
|
+
kind: "expression" | "regex" | "binding";
|
|
2379
|
+
name: string;
|
|
2380
|
+
value: string | number | boolean | string[];
|
|
2381
|
+
at: number;
|
|
2382
|
+
}
|
|
2383
|
+
/** The persisted auto snapshot state of a run: the reviewed interval, the last snapshot time and the snapshot count inside the reviewed maximum. */
|
|
2384
|
+
export interface autosnapshotstate {
|
|
2385
|
+
interval: autointerval;
|
|
2386
|
+
lastat: number;
|
|
2387
|
+
count: number;
|
|
2388
|
+
}
|
|
2389
|
+
/** One composed workflow record: the id, the reviewed name, the version, the origin grants the workflow stays inside, the frozen expanded step list and the reusable block definitions. */
|
|
2390
|
+
export interface workflowrecord {
|
|
2391
|
+
id: string;
|
|
2392
|
+
name: string;
|
|
2393
|
+
version: number;
|
|
2394
|
+
/** Origin grants the workflow steps must stay inside; composition refuses ungranted origins. */
|
|
2395
|
+
origins: string[];
|
|
2396
|
+
/** The frozen expanded step list reviewed before any run; blocks never hide steps from review. */
|
|
2397
|
+
steps: workflowstep[];
|
|
2398
|
+
/** Reusable block definitions the expanded list was flattened from. */
|
|
2399
|
+
blocks: workflowblock[];
|
|
2400
|
+
/** Derived review grade: a workflow that writes, submits or navigates is sensitive for review. */
|
|
2401
|
+
risk: actionrisk;
|
|
2402
|
+
createdat: number;
|
|
2403
|
+
}
|
|
2404
|
+
/** One workflow step: the action kind, the optional target and value, the reviewed JSON options, the output bindings and the human readable label. */
|
|
2405
|
+
export interface workflowstep {
|
|
2406
|
+
id: string;
|
|
2407
|
+
kind: actionkind;
|
|
2408
|
+
label: string;
|
|
2409
|
+
target?: string;
|
|
2410
|
+
value?: string;
|
|
2411
|
+
options?: string;
|
|
2412
|
+
/** Bindings that link the outcome of this step to named variables of the following steps. */
|
|
2413
|
+
bindings?: variablebinding[];
|
|
2414
|
+
/** Expression evaluated inline before this step runs; the result lands in the named result variable. */
|
|
2415
|
+
expression?: expressiontype;
|
|
2416
|
+
/** Regex rule applied to the step text before this step runs; the named captures land in scope variables. */
|
|
2417
|
+
extract?: regexrule;
|
|
2418
|
+
/** Innermost reusable block the step expanded from so runs highlight the active block during nested execution. */
|
|
2419
|
+
block?: string;
|
|
2420
|
+
}
|
|
2421
|
+
/** One reusable workflow block that nests child steps and further block invocations under a reusable name. */
|
|
2422
|
+
export interface workflowblock {
|
|
2423
|
+
name: string;
|
|
2424
|
+
label: string;
|
|
2425
|
+
/** Child steps and nested block invocations in execution order. */
|
|
2426
|
+
steps: Array<workflowstep | blockinvocation>;
|
|
2427
|
+
}
|
|
2428
|
+
/** One block invocation inside a workflow step list or a nested block. */
|
|
2429
|
+
export interface blockinvocation {
|
|
2430
|
+
block: string;
|
|
2431
|
+
label: string;
|
|
2432
|
+
}
|
|
2433
|
+
/** One shareable step template: a named workflow step marked as shareable across workflows. */
|
|
2434
|
+
export interface steptemplate {
|
|
2435
|
+
id: string;
|
|
2436
|
+
name: string;
|
|
2437
|
+
origin: string;
|
|
2438
|
+
step: workflowstep;
|
|
2439
|
+
sharedat: number;
|
|
2440
|
+
}
|
|
2441
|
+
/** The variable kinds a typed scope holds: strings, numbers, booleans, lists and element references. */
|
|
2442
|
+
export type variablekind = "string" | "number" | "boolean" | "list" | "element";
|
|
2443
|
+
/** One variable value of a typed scope with its name, kind, value and set time. */
|
|
2444
|
+
export interface variablevalue {
|
|
2445
|
+
name: string;
|
|
2446
|
+
kind: variablekind;
|
|
2447
|
+
value: string | number | boolean | string[];
|
|
2448
|
+
setat: number;
|
|
2449
|
+
}
|
|
2450
|
+
/** One typed variable scope: the scope name, its variables and the optional parent scope it chains to for resolution. */
|
|
2451
|
+
export interface variablescope {
|
|
2452
|
+
name: string;
|
|
2453
|
+
variables: variablevalue[];
|
|
2454
|
+
parent?: string;
|
|
2455
|
+
}
|
|
2456
|
+
/** One variable binding that links a step output path to a named variable of a typed kind. */
|
|
2457
|
+
export interface variablebinding {
|
|
2458
|
+
variable: string;
|
|
2459
|
+
kind: variablekind;
|
|
2460
|
+
stepid: string;
|
|
2461
|
+
/** Dotted path into the step outcome details; an absent path binds the summary. */
|
|
2462
|
+
path?: string;
|
|
2463
|
+
}
|
|
2464
|
+
/** One expression operand: a variable reference resolved from the nearest scope outward or a literal value. */
|
|
2465
|
+
export interface expressionoperand {
|
|
2466
|
+
ref?: string;
|
|
2467
|
+
literal?: string | number | boolean;
|
|
2468
|
+
}
|
|
2469
|
+
/** The reviewed expression operators between variables: arithmetic, comparison and logic. */
|
|
2470
|
+
export type expressionoperator = "add" | "subtract" | "multiply" | "divide" | "modulo" | "equal" | "notequal" | "less" | "greater" | "lessequal" | "greaterequal" | "and" | "or" | "not" | "concat" | "contains" | "length";
|
|
2471
|
+
/** One reviewed expression: the operands, the operator and the result variable with its result kind. */
|
|
2472
|
+
export interface expressiontype {
|
|
2473
|
+
left: expressionoperand;
|
|
2474
|
+
right?: expressionoperand;
|
|
2475
|
+
operator: expressionoperator;
|
|
2476
|
+
result: string;
|
|
2477
|
+
resultkind: variablekind;
|
|
2478
|
+
}
|
|
2479
|
+
/** One reviewed regex rule: the pattern, the flags and the named capture groups stored as variables. */
|
|
2480
|
+
export interface regexrule {
|
|
2481
|
+
pattern: string;
|
|
2482
|
+
flags: string;
|
|
2483
|
+
groups: string[];
|
|
2484
|
+
}
|
|
2485
|
+
/** One reviewed delay: the base milliseconds and the jitter window the sampled delay stays inside. */
|
|
2486
|
+
export interface delaystep {
|
|
2487
|
+
base: number;
|
|
2488
|
+
jitter: number;
|
|
2489
|
+
}
|
|
2490
|
+
/** One reviewed element wait: the selector, the timeout and the poll interval; every value stays a user choice with no code ceiling. */
|
|
2491
|
+
export interface waitstep {
|
|
2492
|
+
selector: string;
|
|
2493
|
+
timeout: number;
|
|
2494
|
+
poll: number;
|
|
2495
|
+
}
|
|
2496
|
+
/** The states of a workflow run: pending, running, paused, done, failed and cancelled. */
|
|
2497
|
+
export type runstate = "pending" | "running" | "paused" | "done" | "failed" | "cancelled";
|
|
2498
|
+
/** One workflow run: the id, the workflow id, the state, the step cursor of the last checkpoint and the start and end times. */
|
|
2499
|
+
export interface workflowrun {
|
|
2500
|
+
id: string;
|
|
2501
|
+
workflowid: string;
|
|
2502
|
+
state: runstate;
|
|
2503
|
+
/** Index of the next step to execute; every completed step checkpoints the cursor. */
|
|
2504
|
+
cursor: number;
|
|
2505
|
+
startedat: number;
|
|
2506
|
+
endedat?: number;
|
|
2507
|
+
/** True when the run evaluates every step with no browser mutation. */
|
|
2508
|
+
dryrun?: boolean;
|
|
2509
|
+
pausedat?: number;
|
|
2510
|
+
cancelreason?: string;
|
|
2511
|
+
failreason?: string;
|
|
2512
|
+
}
|
|
2513
|
+
/** One runlog entry: the step id, its label, the state, the duration and the outcome details with the bindings produced and consumed. */
|
|
2514
|
+
export interface runlogentry {
|
|
2515
|
+
stepid: string;
|
|
2516
|
+
label: string;
|
|
2517
|
+
state: "running" | "done" | "failed" | "refused";
|
|
2518
|
+
startedat: number;
|
|
2519
|
+
duration: number;
|
|
2520
|
+
summary: string;
|
|
2521
|
+
/** Block name the step executed inside so nested runs highlight the active block. */
|
|
2522
|
+
block?: string;
|
|
2523
|
+
/** Variable names this step consumed from the scopes. */
|
|
2524
|
+
consumed?: string[];
|
|
2525
|
+
/** Variable names this step produced into the scopes. */
|
|
2526
|
+
produced?: string[];
|
|
2527
|
+
/** True once a checkpoint landed after this step so the timeline shows the checkpoint markers. */
|
|
2528
|
+
checkpoint?: boolean;
|
|
2529
|
+
details?: Record<string, unknown>;
|
|
2530
|
+
}
|
|
2237
2531
|
//# sourceMappingURL=types.d.ts.map
|