@wenathlan/extension 1.1.52 → 1.1.54
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 +4 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2106 -596
- package/dist/index.js.map +4 -4
- package/dist/mcpserver.d.ts +167 -0
- package/dist/mcpserver.d.ts.map +1 -0
- package/dist/memory.d.ts +74 -1
- package/dist/memory.d.ts.map +1 -1
- package/dist/policy.d.ts +48 -1
- package/dist/policy.d.ts.map +1 -1
- package/dist/protocol.d.ts +102 -2
- package/dist/protocol.d.ts.map +1 -1
- package/dist/toolcatalog.d.ts +31 -0
- package/dist/toolcatalog.d.ts.map +1 -0
- package/dist/types.d.ts +355 -3
- package/dist/types.d.ts.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/workflow.d.ts +19 -3
- package/dist/workflow.d.ts.map +1 -1
- package/dist/workfloweditor.d.ts +108 -0
- package/dist/workfloweditor.d.ts.map +1 -0
- package/extension/dist/background.js +1773 -20
- package/extension/dist/background.js.map +4 -4
- package/extension/dist/manifest.json +1 -1
- package/extension/dist/pagebridge.js +1 -1
- package/extension/dist/pagebridge.js.map +2 -2
- package/extension/dist/popup.html +1 -1
- package/extension/dist/popup.js +12 -1
- package/extension/dist/popup.js.map +2 -2
- package/extension/dist/sidepanel.html +1 -1
- package/extension/dist/sidepanel.js +1419 -1
- package/extension/dist/sidepanel.js.map +4 -4
- package/extension/dist/style.css +2 -0
- 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.54";
|
|
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" | "composeworkflow" | "savetemplate" | "runworkflow" | "dryrun" | "delay" | "waitelement" | "compute" | "extractvars" | "condition" | "branch" | "loop" | "repeatuntil" | "whileloop" | "foreach" | "parallel" | "trycatch" | "visitrule" | "urlrule" | "menurule" | "keyrule" | "buttonrule" | "cronrule" | "intervalrule" | "urllistrule" | "webhookrule" | "eventrule";
|
|
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" | "listruns" | "condition" | "branch" | "loop" | "repeatuntil" | "whileloop" | "foreach" | "parallel" | "trycatch" | "visitrule" | "urlrule" | "menurule" | "keyrule" | "buttonrule" | "cronrule" | "intervalrule" | "urllistrule" | "webhookrule" | "eventrule";
|
|
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" | "workflow" | "trigger";
|
|
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" | "trigger" | "protocol" | "tool";
|
|
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 {
|
|
@@ -178,6 +178,10 @@ export interface runsettings {
|
|
|
178
178
|
triggerretention?: number;
|
|
179
179
|
/** Retention window for stored workflow runlog entries; an absent window keeps every entry while the run summaries always survive for the audit trail. */
|
|
180
180
|
runlogretention?: number;
|
|
181
|
+
/** Retention window for stored run history entries; an absent window keeps every entry of every execution. */
|
|
182
|
+
runhistoryretention?: number;
|
|
183
|
+
/** Watchdog configuration of the workflow editor: the stall threshold and the recovery action stay user configured values with no code ceiling. */
|
|
184
|
+
watchdog?: watchdogconfig;
|
|
181
185
|
}
|
|
182
186
|
export interface proposalrequest {
|
|
183
187
|
objective: string;
|
|
@@ -2401,6 +2405,8 @@ export interface workflowrecord {
|
|
|
2401
2405
|
blocks: workflowblock[];
|
|
2402
2406
|
/** Derived review grade: a workflow that writes, submits or navigates is sensitive for review. */
|
|
2403
2407
|
risk: actionrisk;
|
|
2408
|
+
/** Review state of an imported workflow or a version rollback: pending stays unrunnable until the user approves the reviewed step list. */
|
|
2409
|
+
reviewstate?: "pending" | "approved";
|
|
2404
2410
|
createdat: number;
|
|
2405
2411
|
}
|
|
2406
2412
|
/** One workflow step: the action kind, the optional target and value, the reviewed JSON options, the output bindings and the human readable label. */
|
|
@@ -2419,6 +2425,10 @@ export interface workflowstep {
|
|
|
2419
2425
|
extract?: regexrule;
|
|
2420
2426
|
/** Innermost reusable block the step expanded from so runs highlight the active block during nested execution. */
|
|
2421
2427
|
block?: string;
|
|
2428
|
+
/** Breakpoint marker of editor debugging: a debug run pauses before this step. */
|
|
2429
|
+
breakpoint?: boolean;
|
|
2430
|
+
/** Nested parameters the enclosing block invocation binds into the block scope; expansion stamps them on the first step of the invocation region. */
|
|
2431
|
+
params?: nestedparam[];
|
|
2422
2432
|
}
|
|
2423
2433
|
/** One reusable workflow block that nests child steps and further block invocations under a reusable name. */
|
|
2424
2434
|
export interface workflowblock {
|
|
@@ -2431,6 +2441,8 @@ export interface workflowblock {
|
|
|
2431
2441
|
export interface blockinvocation {
|
|
2432
2442
|
block: string;
|
|
2433
2443
|
label: string;
|
|
2444
|
+
/** Nested parameters the invocation binds into the block scope before its first step runs. */
|
|
2445
|
+
params?: nestedparam[];
|
|
2434
2446
|
}
|
|
2435
2447
|
/** One shareable step template: a named workflow step marked as shareable across workflows. */
|
|
2436
2448
|
export interface steptemplate {
|
|
@@ -2511,6 +2523,10 @@ export interface workflowrun {
|
|
|
2511
2523
|
pausedat?: number;
|
|
2512
2524
|
cancelreason?: string;
|
|
2513
2525
|
failreason?: string;
|
|
2526
|
+
/** True when the run keeps executing in the service worker with no panel open; checkpoints restore it on every worker wake. */
|
|
2527
|
+
background?: boolean;
|
|
2528
|
+
/** Why the run paused: a user pause, a watchdog recovery or a browser interruption the startup hook marked. */
|
|
2529
|
+
pausekind?: "user" | "watchdog" | "interrupt";
|
|
2514
2530
|
}
|
|
2515
2531
|
/** One runlog entry: the step id, its label, the state, the duration and the outcome details with the bindings produced and consumed. */
|
|
2516
2532
|
export interface runlogentry {
|
|
@@ -2775,4 +2791,340 @@ export interface manualrun {
|
|
|
2775
2791
|
decidedat?: number;
|
|
2776
2792
|
at: number;
|
|
2777
2793
|
}
|
|
2794
|
+
/** One canvas node of the workflow editor: the workflow step or the block invocation it renders with its canvas position. */
|
|
2795
|
+
export interface editornode {
|
|
2796
|
+
/** The canvas node id: the step id, or the invocation id of a loaded block invocation which stays unique even when one block is invoked many times. */
|
|
2797
|
+
id?: string;
|
|
2798
|
+
/** The workflow step this node renders; absent on a block invocation node. */
|
|
2799
|
+
step?: workflowstep;
|
|
2800
|
+
/** The block invocation this node renders; absent on a plain step node. */
|
|
2801
|
+
invocation?: blockinvocation;
|
|
2802
|
+
x: number;
|
|
2803
|
+
y: number;
|
|
2804
|
+
}
|
|
2805
|
+
/** One canvas edge of the workflow editor: a typed binding socket that links the output of one step into the input of a later step. */
|
|
2806
|
+
export interface editoredge {
|
|
2807
|
+
from: string;
|
|
2808
|
+
to: string;
|
|
2809
|
+
variable: string;
|
|
2810
|
+
kind: variablekind;
|
|
2811
|
+
/** Dotted path into the source step outcome details; an absent path binds the summary. */
|
|
2812
|
+
path?: string;
|
|
2813
|
+
}
|
|
2814
|
+
/** The layout state of the canvas: the canvas size, the viewport origin and the zoom factor. */
|
|
2815
|
+
export interface editorlayout {
|
|
2816
|
+
width: number;
|
|
2817
|
+
height: number;
|
|
2818
|
+
viewportx: number;
|
|
2819
|
+
viewporty: number;
|
|
2820
|
+
zoom: number;
|
|
2821
|
+
}
|
|
2822
|
+
/** The mini map state: the mini canvas size, the projection scale from canvas coordinates and the viewport rectangle inside it. */
|
|
2823
|
+
export interface minimapstate {
|
|
2824
|
+
width: number;
|
|
2825
|
+
height: number;
|
|
2826
|
+
/** Projection scale from canvas coordinates to mini map coordinates. */
|
|
2827
|
+
scale: number;
|
|
2828
|
+
zoom: number;
|
|
2829
|
+
/** The viewport rectangle in mini map coordinates. */
|
|
2830
|
+
viewport: {
|
|
2831
|
+
x: number;
|
|
2832
|
+
y: number;
|
|
2833
|
+
width: number;
|
|
2834
|
+
height: number;
|
|
2835
|
+
};
|
|
2836
|
+
}
|
|
2837
|
+
/** The full canvas model the editor edits: the nodes, the typed edges, the block definitions, the layout, the mini map, the undo and redo stacks and the dirty marker. */
|
|
2838
|
+
export interface editormodel {
|
|
2839
|
+
workflowid: string;
|
|
2840
|
+
name: string;
|
|
2841
|
+
version: number;
|
|
2842
|
+
origins: string[];
|
|
2843
|
+
nodes: editornode[];
|
|
2844
|
+
edges: editoredge[];
|
|
2845
|
+
blocks: workflowblock[];
|
|
2846
|
+
layout: editorlayout;
|
|
2847
|
+
minimap: minimapstate;
|
|
2848
|
+
/** Undo snapshots, newest last; a snapshot never carries its own nested history. */
|
|
2849
|
+
undo?: editormodel[];
|
|
2850
|
+
/** Redo snapshots, newest last; a new edit clears them. */
|
|
2851
|
+
redo?: editormodel[];
|
|
2852
|
+
dirty: boolean;
|
|
2853
|
+
}
|
|
2854
|
+
/** The five categories of the block palette: actions, control flow, waits, variables and triggers. */
|
|
2855
|
+
export type palettecategory = "actions" | "controlflow" | "waits" | "variables" | "triggers";
|
|
2856
|
+
/** One palette descriptor of the block palette: the drop kind, its label, its category and its description. */
|
|
2857
|
+
export interface palettenode {
|
|
2858
|
+
kind: string;
|
|
2859
|
+
label: string;
|
|
2860
|
+
category: palettecategory;
|
|
2861
|
+
description: string;
|
|
2862
|
+
}
|
|
2863
|
+
/** One step library entry: the action kind, its palette category and its reviewed option schema. */
|
|
2864
|
+
export interface steplibraryentry {
|
|
2865
|
+
kind: string;
|
|
2866
|
+
category: palettecategory;
|
|
2867
|
+
optionschema: Array<{
|
|
2868
|
+
name: string;
|
|
2869
|
+
kind: "string" | "number" | "boolean";
|
|
2870
|
+
required?: boolean;
|
|
2871
|
+
}>;
|
|
2872
|
+
}
|
|
2873
|
+
/** One local workflow version: the version number, its timestamp and the change note beside the step count and risk grade. */
|
|
2874
|
+
export interface workflowversion {
|
|
2875
|
+
workflowid: string;
|
|
2876
|
+
version: number;
|
|
2877
|
+
createdat: number;
|
|
2878
|
+
note: string;
|
|
2879
|
+
steps: number;
|
|
2880
|
+
risk?: actionrisk;
|
|
2881
|
+
/** True when the version was created by rolling an older version back; the rollback review gates its first run. */
|
|
2882
|
+
rollback?: boolean;
|
|
2883
|
+
}
|
|
2884
|
+
/** One version diff result: the added, removed and changed steps between two workflow versions. */
|
|
2885
|
+
export interface versiondiff {
|
|
2886
|
+
workflowid: string;
|
|
2887
|
+
from: number;
|
|
2888
|
+
to: number;
|
|
2889
|
+
added: Array<{
|
|
2890
|
+
stepid: string;
|
|
2891
|
+
kind: string;
|
|
2892
|
+
label: string;
|
|
2893
|
+
}>;
|
|
2894
|
+
removed: Array<{
|
|
2895
|
+
stepid: string;
|
|
2896
|
+
kind: string;
|
|
2897
|
+
label: string;
|
|
2898
|
+
}>;
|
|
2899
|
+
changed: Array<{
|
|
2900
|
+
stepid: string;
|
|
2901
|
+
kind: string;
|
|
2902
|
+
label: string;
|
|
2903
|
+
changes: string[];
|
|
2904
|
+
}>;
|
|
2905
|
+
at: number;
|
|
2906
|
+
}
|
|
2907
|
+
/** One run history entry: the outcome, the executed step count, the duration and the trigger cause of one execution. */
|
|
2908
|
+
export interface runhistoryentry {
|
|
2909
|
+
runid: string;
|
|
2910
|
+
workflowid: string;
|
|
2911
|
+
outcome: string;
|
|
2912
|
+
steps: number;
|
|
2913
|
+
total: number;
|
|
2914
|
+
duration: number;
|
|
2915
|
+
cause: string;
|
|
2916
|
+
startedat: number;
|
|
2917
|
+
endedat: number;
|
|
2918
|
+
dryrun?: boolean;
|
|
2919
|
+
}
|
|
2920
|
+
/** The export formats of a workflow file: json or yaml. */
|
|
2921
|
+
export type exportformat = "json" | "yaml";
|
|
2922
|
+
/** One exported workflow file: the file format version, the export time, the workflow record, the change note and the packed step templates. */
|
|
2923
|
+
export interface workflowfile {
|
|
2924
|
+
format: 1;
|
|
2925
|
+
exportedat: number;
|
|
2926
|
+
workflow: workflowrecord;
|
|
2927
|
+
note?: string;
|
|
2928
|
+
templates: steptemplate[];
|
|
2929
|
+
}
|
|
2930
|
+
/** One nested parameter of a block invocation: the name, the variable kind and the default value bound into the block scope. */
|
|
2931
|
+
export interface nestedparam {
|
|
2932
|
+
name: string;
|
|
2933
|
+
kind: variablekind;
|
|
2934
|
+
default?: string | number | boolean | string[];
|
|
2935
|
+
}
|
|
2936
|
+
/** One pending workflow import held for review: the parsed record stays unrunnable until the user approves it. */
|
|
2937
|
+
export interface workflowimport {
|
|
2938
|
+
id: string;
|
|
2939
|
+
record: workflowrecord;
|
|
2940
|
+
importedat: number;
|
|
2941
|
+
filename?: string;
|
|
2942
|
+
}
|
|
2943
|
+
/** One per site policy override of a workflow: the origin pattern and the reviewed policy knobs it adjusts. */
|
|
2944
|
+
export interface siteoverride {
|
|
2945
|
+
id: string;
|
|
2946
|
+
workflowid: string;
|
|
2947
|
+
pattern: string;
|
|
2948
|
+
deltas: Record<string, number>;
|
|
2949
|
+
createdat: number;
|
|
2950
|
+
}
|
|
2951
|
+
/** The watchdog configuration: the stall threshold and the recovery action, both user configured values with no code ceiling. */
|
|
2952
|
+
export interface watchdogconfig {
|
|
2953
|
+
enabled: boolean;
|
|
2954
|
+
/** Milliseconds without a completed step after which a running run grades stalled. */
|
|
2955
|
+
stallthreshold: number;
|
|
2956
|
+
action: "retry" | "pause" | "cancel";
|
|
2957
|
+
/** Window after which a running run with no live executor reaps as a zombie of a browser shutdown. */
|
|
2958
|
+
zombiewindow?: number;
|
|
2959
|
+
}
|
|
2960
|
+
/** One watchdog event: the run it touched, the verdict and the recovery outcome. */
|
|
2961
|
+
export interface watchdogrecord {
|
|
2962
|
+
id: string;
|
|
2963
|
+
runid: string;
|
|
2964
|
+
verdict: "stalled" | "zombie" | "healthy";
|
|
2965
|
+
action: "retry" | "pause" | "cancel" | "reap" | "none";
|
|
2966
|
+
outcome: string;
|
|
2967
|
+
at: number;
|
|
2968
|
+
}
|
|
2969
|
+
/**
|
|
2970
|
+
* Agent protocol contracts of the 1.1.54 family: the mcp tool catalog, json rpc frames, capability sets, client records, the stdio bridge and the server config.
|
|
2971
|
+
* Every tool call lands behind the same consent gates that govern the panels, and no endpoint, provider or key is ever hardcoded — the protocol speaks to any client the user pairs.
|
|
2972
|
+
*/
|
|
2973
|
+
/** The tool namespaces of the mcp server: every tool name carries its domain prefix so clients address `browser.click`, `workflow.run`, `memory.audit` or `system.status` without collisions. */
|
|
2974
|
+
export type toolnamespace = "browser" | "workflow" | "memory" | "system";
|
|
2975
|
+
/** The transports an mcp client may ride: the stdio bridge for local client processes and the http listener for posted envelopes. */
|
|
2976
|
+
export type transportkind = "stdio" | "http";
|
|
2977
|
+
/** The lifecycle states of the mcp server: stopped by default, running once the user enables it, idle between paired client sessions. */
|
|
2978
|
+
export type serverstate = "stopped" | "running" | "idle";
|
|
2979
|
+
/** The json rpc error codes of the agent protocol: parse, method, params, internal and consentrefused map onto the classic json rpc numbers with consentrefused reserved for gate refusals. */
|
|
2980
|
+
export type rpcerrorcode = "parse" | "method" | "params" | "internal" | "consentrefused";
|
|
2981
|
+
/** One json rpc error payload: the code name, the human readable message and optional structured data. */
|
|
2982
|
+
export interface rpcerror {
|
|
2983
|
+
code: rpcerrorcode;
|
|
2984
|
+
message: string;
|
|
2985
|
+
data?: unknown;
|
|
2986
|
+
}
|
|
2987
|
+
/** One json rpc frame: a request carries the id, method and params while a response carries the same id with either a result or an error; notifications omit the id. */
|
|
2988
|
+
export interface jsonrpcframe {
|
|
2989
|
+
jsonrpc: "2.0";
|
|
2990
|
+
id?: number | string | null;
|
|
2991
|
+
method?: string;
|
|
2992
|
+
params?: Record<string, unknown>;
|
|
2993
|
+
result?: unknown;
|
|
2994
|
+
error?: rpcerror;
|
|
2995
|
+
}
|
|
2996
|
+
/** One typed property of a tool input schema: the json schema type, the plain language description, the required flag and the reviewed default value. */
|
|
2997
|
+
export interface toolschemaproperty {
|
|
2998
|
+
type: "string" | "number" | "boolean" | "object" | "array";
|
|
2999
|
+
description: string;
|
|
3000
|
+
required?: boolean;
|
|
3001
|
+
/** Reviewed default value the server applies when a client omits the property. */
|
|
3002
|
+
default?: string | number | boolean | Record<string, unknown>;
|
|
3003
|
+
}
|
|
3004
|
+
/** The json schema of one tool input: typed properties, the required property names and the default values the server applies when a client omits them. */
|
|
3005
|
+
export interface toolschema {
|
|
3006
|
+
type: "object";
|
|
3007
|
+
properties: Record<string, toolschemaproperty>;
|
|
3008
|
+
required: string[];
|
|
3009
|
+
}
|
|
3010
|
+
/** The consent metadata of a sensitive tool: the plain language review requirement the panel renders before the tool may run. */
|
|
3011
|
+
export interface consentmeta {
|
|
3012
|
+
review: string;
|
|
3013
|
+
}
|
|
3014
|
+
/** One mcp tool definition: the namespaced name, the version appended for compatibility checks, the description that states the consent class and side effects in plain language, the json schema of its inputs, the reviewed action kind it wraps, its risk grade and the consent metadata of tools with side effects. */
|
|
3015
|
+
export interface tooldef {
|
|
3016
|
+
name: string;
|
|
3017
|
+
version: number;
|
|
3018
|
+
description: string;
|
|
3019
|
+
inputschema: toolschema;
|
|
3020
|
+
/** The reviewed action kind this tool wraps; policy validates it against the action kind grammar. */
|
|
3021
|
+
kind: actionkind;
|
|
3022
|
+
/** The risk grade of the wrapped action kind; policy re-derives it and refuses a mismatch. */
|
|
3023
|
+
risk: actionrisk;
|
|
3024
|
+
/** Consent metadata required on every tool with side effects. */
|
|
3025
|
+
consentmeta?: consentmeta;
|
|
3026
|
+
}
|
|
3027
|
+
/** One tool domain of the catalog: the namespace that prefixes its tool names, the domain version and the tools it exposes. */
|
|
3028
|
+
export interface tooldomain {
|
|
3029
|
+
namespace: toolnamespace;
|
|
3030
|
+
version: number;
|
|
3031
|
+
tools: tooldef[];
|
|
3032
|
+
}
|
|
3033
|
+
/** The mcp tool catalog: the catalog version and the four tool domains with their versions and consent metadata. */
|
|
3034
|
+
export interface toolcatalog {
|
|
3035
|
+
version: number;
|
|
3036
|
+
domains: tooldomain[];
|
|
3037
|
+
}
|
|
3038
|
+
/** One result of a tool call: the human readable content, the structured payload and the error flag that carries tool failures inside a successful json rpc result. */
|
|
3039
|
+
export interface toolresult {
|
|
3040
|
+
content: string;
|
|
3041
|
+
payload?: Record<string, unknown>;
|
|
3042
|
+
iserror: boolean;
|
|
3043
|
+
}
|
|
3044
|
+
/** The capability set exchanged during negotiation: the protocol version, the server identity, the tool compatibility floor, the offered tool count, the namespaces and the allowed transports. */
|
|
3045
|
+
export interface capabilityset {
|
|
3046
|
+
protocolversion: string;
|
|
3047
|
+
name: string;
|
|
3048
|
+
version: string;
|
|
3049
|
+
/** Tool compatibility floor: tools with a version below the negotiated floor are refused. */
|
|
3050
|
+
toolversion: number;
|
|
3051
|
+
tools: number;
|
|
3052
|
+
namespaces: toolnamespace[];
|
|
3053
|
+
transports: transportkind[];
|
|
3054
|
+
}
|
|
3055
|
+
/** One connected mcp client: the id, the transport it rides, the negotiated capability set, the pairing state the user approves and the connection timestamps. */
|
|
3056
|
+
export interface clientrecord {
|
|
3057
|
+
id: string;
|
|
3058
|
+
transport: transportkind;
|
|
3059
|
+
/** The capability set negotiated with this client. */
|
|
3060
|
+
capabilities?: capabilityset;
|
|
3061
|
+
/** True once the user approved the session for this client; unpaired clients never dispatch tools. */
|
|
3062
|
+
paired: boolean;
|
|
3063
|
+
connectedat: number;
|
|
3064
|
+
/** Approval decision time of the pairing prompt. */
|
|
3065
|
+
pairedat?: number;
|
|
3066
|
+
lastseenat?: number;
|
|
3067
|
+
disconnectedat?: number;
|
|
3068
|
+
}
|
|
3069
|
+
/** One entry of the mcp server routing table: the json rpc method name, the plain language description and the internal handler the server routes matching frames to. */
|
|
3070
|
+
export interface methodentry {
|
|
3071
|
+
method: string;
|
|
3072
|
+
handler: "initialize" | "ping" | "listtools" | "negotiate" | "dispatch";
|
|
3073
|
+
description: string;
|
|
3074
|
+
}
|
|
3075
|
+
/** The user configured mcp server state: the bind address with localhost as the documented default, the port, the allowed transports, the user configured frame size and queue depth with no code ceiling, the explicit user enablement flag and the reviewed flag a remote bind requires. */
|
|
3076
|
+
export interface mcpserverconfig {
|
|
3077
|
+
bind?: string;
|
|
3078
|
+
port: number;
|
|
3079
|
+
transports: transportkind[];
|
|
3080
|
+
/** User configured maximum serialized frame size; an absent value never refuses a frame. */
|
|
3081
|
+
framesize?: number;
|
|
3082
|
+
/** User configured request queue depth per client; an absent value keeps the queue unbounded. */
|
|
3083
|
+
queuedepth?: number;
|
|
3084
|
+
/** User configured retention window for stored tool call records; an absent window keeps every record while the audit trail always survives. */
|
|
3085
|
+
callretention?: number;
|
|
3086
|
+
/** True once the user enabled the server; the server never starts without it. */
|
|
3087
|
+
enabled: boolean;
|
|
3088
|
+
/** True once the user reviewed the remote bind; a bind outside localhost is refused without it. */
|
|
3089
|
+
remote?: boolean;
|
|
3090
|
+
}
|
|
3091
|
+
/** The persisted runtime state of the mcp server: the server state, the stdio bridge status and the last transition times. */
|
|
3092
|
+
export interface mcpserverstate {
|
|
3093
|
+
state: serverstate;
|
|
3094
|
+
/** The stdio bridge status while the server runs. */
|
|
3095
|
+
bridge?: stdiobridge;
|
|
3096
|
+
startedat?: number;
|
|
3097
|
+
stoppedat?: number;
|
|
3098
|
+
}
|
|
3099
|
+
/** The stdio bridge of one local client process: the native messaging host name, the connection state, the process id, the restart counter and the frame counters of both relay directions. */
|
|
3100
|
+
export interface stdiobridge {
|
|
3101
|
+
id: string;
|
|
3102
|
+
host: string;
|
|
3103
|
+
connected: boolean;
|
|
3104
|
+
/** Process id of the launched client process. */
|
|
3105
|
+
pid?: number;
|
|
3106
|
+
startedat: number;
|
|
3107
|
+
restarts: number;
|
|
3108
|
+
received: number;
|
|
3109
|
+
sent: number;
|
|
3110
|
+
lastframeat?: number;
|
|
3111
|
+
}
|
|
3112
|
+
/** One stdio bridge launch event: the host manifest, the process id, the restart marker and the time. */
|
|
3113
|
+
export interface bridgelaunch {
|
|
3114
|
+
id: string;
|
|
3115
|
+
host: string;
|
|
3116
|
+
pid: number;
|
|
3117
|
+
restart: boolean;
|
|
3118
|
+
at: number;
|
|
3119
|
+
}
|
|
3120
|
+
/** One mcp tool call record: the calling client, the namespaced tool name, the origin the call ran under, the outcome flag, the json rpc error code when the call was refused and the time. */
|
|
3121
|
+
export interface toolcallrecord {
|
|
3122
|
+
id: string;
|
|
3123
|
+
clientid: string;
|
|
3124
|
+
tool: string;
|
|
3125
|
+
origin: string;
|
|
3126
|
+
ok: boolean;
|
|
3127
|
+
code?: rpcerrorcode;
|
|
3128
|
+
at: number;
|
|
3129
|
+
}
|
|
2778
3130
|
//# sourceMappingURL=types.d.ts.map
|