@wenathlan/extension 1.1.49 → 1.1.51
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 +6 -5
- package/dist/controlflow.d.ts +220 -0
- package/dist/controlflow.d.ts.map +1 -0
- package/dist/index.d.ts +3 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1708 -12
- package/dist/index.js.map +4 -4
- package/dist/memory.d.ts +40 -1
- package/dist/memory.d.ts.map +1 -1
- package/dist/policy.d.ts +16 -1
- package/dist/policy.d.ts.map +1 -1
- package/dist/protocol.d.ts +85 -0
- package/dist/protocol.d.ts.map +1 -1
- package/dist/types.d.ts +309 -3
- package/dist/types.d.ts.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/workflow.d.ts +157 -0
- package/dist/workflow.d.ts.map +1 -0
- package/extension/dist/background.js +2127 -60
- package/extension/dist/background.js.map +4 -4
- package/extension/dist/manifest.json +1 -1
- package/extension/dist/pagebridge.js +9 -4
- package/extension/dist/pagebridge.js.map +2 -2
- package/extension/dist/popup.html +1 -1
- package/extension/dist/popup.js +48 -3
- package/extension/dist/popup.js.map +2 -2
- package/extension/dist/sidepanel.html +1 -1
- package/extension/dist/sidepanel.js +287 -3
- package/extension/dist/sidepanel.js.map +2 -2
- package/extension/manifest.json +1 -1
- package/package.json +1 -1
package/dist/types.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
export declare const protocolversion: "1.1.
|
|
1
|
+
export declare const protocolversion: "1.1.51";
|
|
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" | "persiststate" | "capturesession" | "restoresession" | "namedsessions" | "diffsessions" | "searchsessions" | "exportsessions" | "importsessions";
|
|
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" | "condition" | "branch" | "loop" | "repeatuntil" | "whileloop" | "foreach" | "parallel" | "trycatch";
|
|
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 {
|
|
@@ -120,6 +120,8 @@ export interface capabilityreport {
|
|
|
120
120
|
profile?: string[];
|
|
121
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. */
|
|
122
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[];
|
|
123
125
|
reportedat: number;
|
|
124
126
|
}
|
|
125
127
|
/** Structured result of one executed step, kept with configurable retention. */
|
|
@@ -172,6 +174,8 @@ export interface runsettings {
|
|
|
172
174
|
emulationretention?: number;
|
|
173
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. */
|
|
174
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;
|
|
175
179
|
}
|
|
176
180
|
export interface proposalrequest {
|
|
177
181
|
objective: string;
|
|
@@ -2368,10 +2372,312 @@ export interface sessionfile {
|
|
|
2368
2372
|
checksum: string;
|
|
2369
2373
|
exportedat: number;
|
|
2370
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
|
+
}
|
|
2371
2383
|
/** The persisted auto snapshot state of a run: the reviewed interval, the last snapshot time and the snapshot count inside the reviewed maximum. */
|
|
2372
2384
|
export interface autosnapshotstate {
|
|
2373
2385
|
interval: autointerval;
|
|
2374
2386
|
lastat: number;
|
|
2375
2387
|
count: number;
|
|
2376
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
|
+
}
|
|
2531
|
+
/** One condition payload of the 1.1.51 control flow family: the expression tested over the extracted values with no page side effect. */
|
|
2532
|
+
export interface conditionstep {
|
|
2533
|
+
expression: expressiontype;
|
|
2534
|
+
}
|
|
2535
|
+
/** One branch path of a branch step: the path name, the optional match expression over page state and extracted values, and the child steps of the path. */
|
|
2536
|
+
export interface branchpath {
|
|
2537
|
+
name: string;
|
|
2538
|
+
/** Expression a path must satisfy to be chosen; the else path carries none. */
|
|
2539
|
+
when?: expressiontype;
|
|
2540
|
+
steps: workflowstep[];
|
|
2541
|
+
}
|
|
2542
|
+
/** One branch payload: the named paths with their match expressions and the mandatory else path that terminates every branch. */
|
|
2543
|
+
export interface branchstep {
|
|
2544
|
+
paths: branchpath[];
|
|
2545
|
+
else: branchpath;
|
|
2546
|
+
}
|
|
2547
|
+
/** One loop payload: the list variable iterated, the item and index variables bound per iteration, the optional user configured safety bound and the child steps of the body. */
|
|
2548
|
+
export interface loopstep {
|
|
2549
|
+
list: string;
|
|
2550
|
+
item: string;
|
|
2551
|
+
index: string;
|
|
2552
|
+
/** User configured maximum iteration count; an absent bound keeps the documented default. */
|
|
2553
|
+
bound?: number;
|
|
2554
|
+
steps: workflowstep[];
|
|
2555
|
+
}
|
|
2556
|
+
/** One repeat until payload: the convergence expression, the optional user configured safety bound and the child steps of the body. */
|
|
2557
|
+
export interface repeatuntilstep {
|
|
2558
|
+
until: expressiontype;
|
|
2559
|
+
/** User configured maximum iteration count; an absent bound keeps the documented default. */
|
|
2560
|
+
bound?: number;
|
|
2561
|
+
steps: workflowstep[];
|
|
2562
|
+
}
|
|
2563
|
+
/** One while payload: the loop condition, the mandatory user configured safety bound and the child steps of the body. */
|
|
2564
|
+
export interface whilestep {
|
|
2565
|
+
while: expressiontype;
|
|
2566
|
+
/** User configured maximum iteration count; a while loop without a safety bound is refused. */
|
|
2567
|
+
bound: number;
|
|
2568
|
+
steps: workflowstep[];
|
|
2569
|
+
}
|
|
2570
|
+
/** One foreach payload: the selector resolved into element references, the item and index variables bound per iteration and the child steps of the body. */
|
|
2571
|
+
export interface foreachstep {
|
|
2572
|
+
selector: string;
|
|
2573
|
+
item: string;
|
|
2574
|
+
index: string;
|
|
2575
|
+
steps: workflowstep[];
|
|
2576
|
+
}
|
|
2577
|
+
/** One parallel branch: the branch id and its child steps executed concurrently in an isolated scope. */
|
|
2578
|
+
export interface parallelbranch {
|
|
2579
|
+
id: string;
|
|
2580
|
+
steps: workflowstep[];
|
|
2581
|
+
}
|
|
2582
|
+
/** The join policy of a parallel step: the reviewed merge strategy of conflicting variable writes and whether sibling branches cancel or continue on branch failure. */
|
|
2583
|
+
export interface joinstep {
|
|
2584
|
+
strategy: "first" | "last" | "fail";
|
|
2585
|
+
onfail: "cancel" | "continue";
|
|
2586
|
+
}
|
|
2587
|
+
/** One parallel payload: the concurrent branches and the join policy that merges their outcomes. */
|
|
2588
|
+
export interface parallelstep {
|
|
2589
|
+
branches: parallelbranch[];
|
|
2590
|
+
join: joinstep;
|
|
2591
|
+
}
|
|
2592
|
+
/** The retry policy of a fragile block: the user configured attempt count with no code ceiling, the backoff shape with base and jitter and the retryable error classes. */
|
|
2593
|
+
export interface retrypolicy {
|
|
2594
|
+
attempts: number;
|
|
2595
|
+
backoff: {
|
|
2596
|
+
shape: "fixed" | "exponential";
|
|
2597
|
+
base: number;
|
|
2598
|
+
jitter: number;
|
|
2599
|
+
};
|
|
2600
|
+
retryable: string[];
|
|
2601
|
+
}
|
|
2602
|
+
/** The error handler of a try step: the catch steps executed on failure and the optional rerun of the body after the handler. */
|
|
2603
|
+
export interface errorhandler {
|
|
2604
|
+
steps: workflowstep[];
|
|
2605
|
+
/** True when the body reruns once after the handler steps. */
|
|
2606
|
+
rerun?: boolean;
|
|
2607
|
+
}
|
|
2608
|
+
/** The timeout policy of a try step: the per step and per run millisecond budgets, both user configured positive values with no code ceiling. */
|
|
2609
|
+
export interface timeoutpolicy {
|
|
2610
|
+
stepms?: number;
|
|
2611
|
+
runms?: number;
|
|
2612
|
+
}
|
|
2613
|
+
/** One try payload: the fragile body steps, the error handler, the optional retry policy and the optional timeout policy. */
|
|
2614
|
+
export interface trystep {
|
|
2615
|
+
steps: workflowstep[];
|
|
2616
|
+
catch: errorhandler;
|
|
2617
|
+
retry?: retrypolicy;
|
|
2618
|
+
timeout?: timeoutpolicy;
|
|
2619
|
+
}
|
|
2620
|
+
/** One loop counter of a run: the step, the iteration path with its nested index trail, the outcome flag and the time, recorded for audit. */
|
|
2621
|
+
export interface loopcounter {
|
|
2622
|
+
stepid: string;
|
|
2623
|
+
path: string;
|
|
2624
|
+
iteration: number;
|
|
2625
|
+
ok: boolean;
|
|
2626
|
+
at: number;
|
|
2627
|
+
}
|
|
2628
|
+
/** One branch outcome of a run: the step, the chosen path and the reason it was chosen. */
|
|
2629
|
+
export interface branchoutcome {
|
|
2630
|
+
stepid: string;
|
|
2631
|
+
path: string;
|
|
2632
|
+
reason: string;
|
|
2633
|
+
at: number;
|
|
2634
|
+
}
|
|
2635
|
+
/** One retry attempt of a run: the step, the attempt number, the backoff delay in milliseconds, the error class and the time. */
|
|
2636
|
+
export interface retryattempt {
|
|
2637
|
+
stepid: string;
|
|
2638
|
+
attempt: number;
|
|
2639
|
+
delay: number;
|
|
2640
|
+
errorclass: string;
|
|
2641
|
+
at: number;
|
|
2642
|
+
}
|
|
2643
|
+
/** One timeout abort of a run: the step, the exceeded budget in milliseconds, the abort scope and the time. */
|
|
2644
|
+
export interface timeoutabort {
|
|
2645
|
+
stepid: string;
|
|
2646
|
+
budget: number;
|
|
2647
|
+
scope: "step" | "run";
|
|
2648
|
+
at: number;
|
|
2649
|
+
}
|
|
2650
|
+
/** One join record of a run: the step, the reviewed merge strategy, the conflicting variable names and the merged variable names. */
|
|
2651
|
+
export interface joinrecord {
|
|
2652
|
+
stepid: string;
|
|
2653
|
+
strategy: string;
|
|
2654
|
+
conflicts: string[];
|
|
2655
|
+
merged: string[];
|
|
2656
|
+
at: number;
|
|
2657
|
+
}
|
|
2658
|
+
/** One parallel branch outcome: the branch id, its ok flag, its summary and the cancelled marker when the join policy cancelled it. */
|
|
2659
|
+
export interface paralleloutcome {
|
|
2660
|
+
branchid: string;
|
|
2661
|
+
ok: boolean;
|
|
2662
|
+
summary: string;
|
|
2663
|
+
cancelled?: boolean;
|
|
2664
|
+
}
|
|
2665
|
+
/** One control flow decision of a run stored for audit: the branch, loop, retry, timeout, join, parallel or catch decision of one control step. */
|
|
2666
|
+
export interface controlflowdecision {
|
|
2667
|
+
runid: string;
|
|
2668
|
+
stepid: string;
|
|
2669
|
+
kind: "branch" | "loop" | "retry" | "timeout" | "join" | "parallel" | "catch";
|
|
2670
|
+
at: number;
|
|
2671
|
+
branch?: branchoutcome;
|
|
2672
|
+
loops?: loopcounter[];
|
|
2673
|
+
retries?: retryattempt[];
|
|
2674
|
+
timeouts?: timeoutabort[];
|
|
2675
|
+
join?: joinrecord;
|
|
2676
|
+
branches?: paralleloutcome[];
|
|
2677
|
+
catch?: {
|
|
2678
|
+
errorclass: string;
|
|
2679
|
+
message: string;
|
|
2680
|
+
rerun: boolean;
|
|
2681
|
+
};
|
|
2682
|
+
}
|
|
2377
2683
|
//# sourceMappingURL=types.d.ts.map
|