@wenathlan/extension 1.1.59 → 1.1.61
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 +5 -3
- package/dist/cli.js +19 -2
- package/dist/environments.d.ts +96 -0
- package/dist/environments.d.ts.map +1 -0
- package/dist/immutablelog.d.ts +73 -0
- package/dist/immutablelog.d.ts.map +1 -0
- package/dist/index.d.ts +7 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1092 -1
- package/dist/index.js.map +4 -4
- package/dist/maskinputs.d.ts +52 -0
- package/dist/maskinputs.d.ts.map +1 -0
- package/dist/memory.d.ts +119 -1
- package/dist/memory.d.ts.map +1 -1
- package/dist/originpolicy.d.ts +150 -0
- package/dist/originpolicy.d.ts.map +1 -0
- package/dist/policy.d.ts +87 -1
- package/dist/policy.d.ts.map +1 -1
- package/dist/protocol.d.ts +121 -2
- package/dist/protocol.d.ts.map +1 -1
- package/dist/runstate.d.ts +127 -0
- package/dist/runstate.d.ts.map +1 -0
- package/dist/sandboxframe.d.ts +45 -0
- package/dist/sandboxframe.d.ts.map +1 -0
- package/dist/types.d.ts +312 -2
- package/dist/types.d.ts.map +1 -1
- package/dist/version.d.ts +1 -1
- package/extension/dist/background.js +1629 -50
- package/extension/dist/background.js.map +4 -4
- package/extension/dist/manifest.json +16 -2
- package/extension/dist/offscreen.html +7 -0
- package/extension/dist/offscreen.js +87 -0
- package/extension/dist/offscreen.js.map +7 -0
- package/extension/dist/pagebridge.js +98 -28
- package/extension/dist/pagebridge.js.map +3 -3
- package/extension/dist/popup.html +1 -1
- package/extension/dist/popup.js +77 -0
- package/extension/dist/popup.js.map +2 -2
- package/extension/dist/sandbox.html +28 -0
- package/extension/dist/sidepanel.html +1 -1
- package/extension/dist/sidepanel.js +572 -0
- package/extension/dist/sidepanel.js.map +4 -4
- package/extension/manifest.json +16 -2
- package/package.json +1 -1
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import type { environmentprovenance, sandboxrender, sandboxrenderresult } from "./types.js";
|
|
2
|
+
/**
|
|
3
|
+
* Sandbox frame logic of the 1.1.60 family.
|
|
4
|
+
* Correlated rules for untrusted markup live here: the render descriptor with its per render nonce, the stripping of scripts and event handlers before any render, the postmessage envelope the sandboxed page answers through, the nonce checked acceptance of every render result and the provenance each render records with its source origin.
|
|
5
|
+
* The sandboxed page carries no extension privileges: a render result never reenters the dom outside the frame, and the untrusted markup never touches the page the session granted.
|
|
6
|
+
*/
|
|
7
|
+
/** Strips every script and event handler from untrusted markup before render: script elements, iframe script sources, javascript urls, inline event handler attributes and style url expressions all leave the markup so the sandboxed frame renders inert content only. */
|
|
8
|
+
export declare function stripscripts(markup: string): string;
|
|
9
|
+
/** Issues the per render nonce of one sandbox render: every message the sandboxed page answers carries the nonce of exactly one render so a stale or replayed message never passes. */
|
|
10
|
+
export declare function nonceof(seed: string): string;
|
|
11
|
+
/** Builds one sandbox render descriptor: the sanitized markup, the per render nonce and the source origin of the untrusted markup, ready for the sandboxed page that holds no extension privileges. */
|
|
12
|
+
export declare function sandboxrenderof(input: {
|
|
13
|
+
id: string;
|
|
14
|
+
markup: string;
|
|
15
|
+
sourceorigin: string;
|
|
16
|
+
stepid: string;
|
|
17
|
+
now: number;
|
|
18
|
+
}): sandboxrender;
|
|
19
|
+
/** Builds the postmessage envelope the executor posts into the sandboxed page: the render nonce and the sanitized markup travel together so the frame answers with the same nonce only. */
|
|
20
|
+
export declare function rendermessage(render: sandboxrender): {
|
|
21
|
+
channel: string;
|
|
22
|
+
type: string;
|
|
23
|
+
nonce: string;
|
|
24
|
+
markup: string;
|
|
25
|
+
};
|
|
26
|
+
/** Accepts one sandbox render result posted back through postmessage: the nonce must answer exactly one known render, an unknown or replayed nonce refuses, and the accepted result stays plain text that never reenters the dom outside the frame. */
|
|
27
|
+
export declare function acceptrenderresult(input: {
|
|
28
|
+
renders: sandboxrender[];
|
|
29
|
+
message: {
|
|
30
|
+
channel?: string;
|
|
31
|
+
type?: string;
|
|
32
|
+
nonce?: string;
|
|
33
|
+
ok?: boolean;
|
|
34
|
+
text?: string;
|
|
35
|
+
summary?: string;
|
|
36
|
+
};
|
|
37
|
+
now: number;
|
|
38
|
+
}): {
|
|
39
|
+
accepted: boolean;
|
|
40
|
+
result?: sandboxrenderresult;
|
|
41
|
+
reason: string;
|
|
42
|
+
};
|
|
43
|
+
/** Reads the provenance of one sandbox render: the source origin, the step and the sandboxframe environment land beside the stored render so the audit reads where every untrusted markup came from. */
|
|
44
|
+
export declare function renderprovenance(render: sandboxrender): environmentprovenance;
|
|
45
|
+
//# sourceMappingURL=sandboxframe.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sandboxframe.d.ts","sourceRoot":"","sources":["../sandboxframe.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,aAAa,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AAE5F;;;;GAIG;AAEH,4QAA4Q;AAC5Q,wBAAgB,YAAY,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CASnD;AAED,uLAAuL;AACvL,wBAAgB,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAW5C;AAED,uMAAuM;AACvM,wBAAgB,eAAe,CAAC,KAAK,EAAE;IAAE,EAAE,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,YAAY,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAA;CAAE,GAAG,aAAa,CAKvI;AAED,2LAA2L;AAC3L,wBAAgB,aAAa,CAAC,MAAM,EAAE,aAAa,GAAG;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAErH;AAED,uPAAuP;AACvP,wBAAgB,kBAAkB,CAAC,KAAK,EAAE;IAAE,OAAO,EAAE,aAAa,EAAE,CAAC;IAAC,OAAO,EAAE;QAAE,OAAO,CAAC,EAAE,MAAM,CAAC;QAAC,IAAI,CAAC,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAC;QAAC,EAAE,CAAC,EAAE,OAAO,CAAC;QAAC,IAAI,CAAC,EAAE,MAAM,CAAC;QAAC,OAAO,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IAAC,GAAG,EAAE,MAAM,CAAA;CAAE,GAAG;IAAE,QAAQ,EAAE,OAAO,CAAC;IAAC,MAAM,CAAC,EAAE,mBAAmB,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAQrQ;AAED,wMAAwM;AACxM,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,aAAa,GAAG,qBAAqB,CAE7E"}
|
package/dist/types.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
export declare const protocolversion: "1.1.
|
|
1
|
+
export declare const protocolversion: "1.1.61";
|
|
2
2
|
/** Every reviewed action kind. Read kinds observe, interaction kinds move focus, sensitive kinds change page or browser state. */
|
|
3
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" | "protocol" | "tool" | "model" | "swarm";
|
|
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" | "model" | "swarm" | "environment" | "worker" | "sandbox" | "grant" | "expiry" | "revoke" | "deny" | "seal" | "mask";
|
|
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 {
|
|
@@ -15,6 +15,8 @@ export interface toolstep {
|
|
|
15
15
|
options?: string;
|
|
16
16
|
summary: string;
|
|
17
17
|
risk: actionrisk;
|
|
18
|
+
/** The execution environment this step names: pagecontext, isolatedworld, offscreenworker or sandboxframe; an absent field routes to the default environment of the kind. */
|
|
19
|
+
environment?: environmentkind;
|
|
18
20
|
}
|
|
19
21
|
export interface agentplan {
|
|
20
22
|
id: string;
|
|
@@ -37,6 +39,8 @@ export interface agentsession {
|
|
|
37
39
|
pausedat?: number;
|
|
38
40
|
/** Origins granted to this session; prepared for multi origin work. */
|
|
39
41
|
grants?: string[];
|
|
42
|
+
/** Execution environments granted to this session beside the origin grants: pagecontext, isolatedworld, offscreenworker and sandboxframe; an absent list keeps the documented default posture while a configured list narrows every step to its entries. */
|
|
43
|
+
environmentgrants?: environmentkind[];
|
|
40
44
|
}
|
|
41
45
|
export interface endpointconfig {
|
|
42
46
|
endpoint: string;
|
|
@@ -62,6 +66,8 @@ export interface observation {
|
|
|
62
66
|
label: string;
|
|
63
67
|
}>;
|
|
64
68
|
capturedat: number;
|
|
69
|
+
/** The execution environment of the capture: pagecontext snapshots read the live page while offscreenworker parses hand the heavy shaping to the worker pool. */
|
|
70
|
+
environment?: environmentkind;
|
|
65
71
|
/** Observation mode of this capture: passive, watching or diffing. */
|
|
66
72
|
mode?: observationmode;
|
|
67
73
|
/** Accessibility tree section captured by the page walker. */
|
|
@@ -130,6 +136,8 @@ export interface stepoutcome {
|
|
|
130
136
|
ok: boolean;
|
|
131
137
|
summary: string;
|
|
132
138
|
details?: Record<string, unknown>;
|
|
139
|
+
/** The execution environment the step ran in, reported beside the outcome. */
|
|
140
|
+
environment?: environmentkind;
|
|
133
141
|
at: number;
|
|
134
142
|
}
|
|
135
143
|
/** User chosen retention windows; an absent value keeps everything forever. */
|
|
@@ -196,6 +204,26 @@ export interface runsettings {
|
|
|
196
204
|
boardretention?: number;
|
|
197
205
|
/** The verification methods the user allows the verifier agents to use; an empty or absent list keeps every method open as the documented user choice. */
|
|
198
206
|
verifiermethods?: string[];
|
|
207
|
+
/** True when the user turns the parse offload on: heavy parsing steps route into the offscreen worker pool instead of the page; an absent value keeps every parse inside the page. */
|
|
208
|
+
parseoffload?: boolean;
|
|
209
|
+
/** The worker pool size of the offscreen document as a user choice with no hard cap; an absent value lets the pool follow the pending parse queue alone. */
|
|
210
|
+
workerpoolsize?: number;
|
|
211
|
+
/** Retention window for stored run state records; an absent window keeps every run state while the keepalive summaries always survive. */
|
|
212
|
+
runstateretention?: number;
|
|
213
|
+
/** The origins the user allows to render untrusted markup inside the sandboxframe; an absent list keeps every origin open as the documented user choice. */
|
|
214
|
+
sandboxorigins?: string[];
|
|
215
|
+
/** The keepalive heartbeat interval in milliseconds; the roadmap documents thirty seconds while the interval stays the user's choice. */
|
|
216
|
+
keepaliveinterval?: number;
|
|
217
|
+
/** The number of silent heartbeat intervals the zombie reaper tolerates before it reaps a run; the roadmap documents three while the number stays the user's choice. */
|
|
218
|
+
zombieintervals?: number;
|
|
219
|
+
/** User configured byte ceiling for the stored run state; an absent value never prunes because the pressure response stays a user choice only. */
|
|
220
|
+
runstatebytes?: number;
|
|
221
|
+
/** The consent window duration the consent prompt offers, in milliseconds; the prompt always names a boundary and never defaults to unlimited, and every window stays the user's choice. */
|
|
222
|
+
consentduration?: number;
|
|
223
|
+
/** Retention window for stored sealed run logs; an absent window keeps every sealed log while the chain verification summaries always survive. */
|
|
224
|
+
logretention?: number;
|
|
225
|
+
/** User configured mask shapes for sensitive field shapes beyond the documented password, token, card and secret families; per origin mask rules extend this list. */
|
|
226
|
+
maskshapes?: string[];
|
|
199
227
|
}
|
|
200
228
|
export interface proposalrequest {
|
|
201
229
|
objective: string;
|
|
@@ -218,6 +246,10 @@ export interface planprogress {
|
|
|
218
246
|
outcomes?: stepoutcome[];
|
|
219
247
|
/** Tabs assigned to the running task so progress tracks work across its tabs. */
|
|
220
248
|
tasktabs?: number[];
|
|
249
|
+
/** The execution environment of every completed step by step id. */
|
|
250
|
+
environments?: Record<string, environmentkind>;
|
|
251
|
+
/** The worker turnaround of every offloaded step by step id, in milliseconds. */
|
|
252
|
+
turnarounds?: Record<string, number>;
|
|
221
253
|
/** Prior progress snapshots preserved when a new plan replaces the tracked one. */
|
|
222
254
|
prior?: planprogress[];
|
|
223
255
|
updatedat: number;
|
|
@@ -4115,4 +4147,282 @@ export interface outputcomparison {
|
|
|
4115
4147
|
differences: string[];
|
|
4116
4148
|
comparedat: number;
|
|
4117
4149
|
}
|
|
4150
|
+
/**
|
|
4151
|
+
* Execution environment contracts of the 1.1.60 family.
|
|
4152
|
+
* Every reviewed step names the concrete environment it executes in: pagecontext runs inside the live page, isolatedworld runs injected logic that page scripts cannot touch, offscreenworker moves heavy parsing into an offscreen document worker pool and sandboxframe renders untrusted markup inside a sandboxed page with no extension privileges.
|
|
4153
|
+
* The consent gates do not move: every environment executes only reviewed steps against granted origins, and no environment ever bypasses the human review.
|
|
4154
|
+
*/
|
|
4155
|
+
/** The execution environments of the 1.1.60 family: the live page, the isolated world of the scripting api, the offscreen document worker pool and the sandboxed frame. */
|
|
4156
|
+
export type environmentkind = "pagecontext" | "isolatedworld" | "offscreenworker" | "sandboxframe";
|
|
4157
|
+
/** The per kind environment profile the policy exposes: the environments the kind may run in and the default the executor routes to. */
|
|
4158
|
+
export interface environmentrequirement {
|
|
4159
|
+
kind: actionkind;
|
|
4160
|
+
environments: environmentkind[];
|
|
4161
|
+
defaultenvironment: environmentkind;
|
|
4162
|
+
}
|
|
4163
|
+
/** One executor traffic envelope for the offscreen worker pool: the parse family, the payload reference and the keys the executor moves as transferable buffers. */
|
|
4164
|
+
export interface workerrequest {
|
|
4165
|
+
id: string;
|
|
4166
|
+
runid: string;
|
|
4167
|
+
stepid: string;
|
|
4168
|
+
/** The parse family the worker executes such as htmlsnapshot, jsonpayload, tablerows, a11ytree, complexselector or stitchshots. */
|
|
4169
|
+
task: string;
|
|
4170
|
+
payload: string;
|
|
4171
|
+
/** The payload keys the executor moves as transferable buffers where the payload carries them. */
|
|
4172
|
+
transferables: string[];
|
|
4173
|
+
sentat: number;
|
|
4174
|
+
}
|
|
4175
|
+
/** One worker answer to the executor: the finished result or one streamed partial chunk with its sequence number. */
|
|
4176
|
+
export interface workerresponse {
|
|
4177
|
+
id: string;
|
|
4178
|
+
requestid: string;
|
|
4179
|
+
ok: boolean;
|
|
4180
|
+
/** The finished result payload; a partial answer carries its chunk in the partial field instead. */
|
|
4181
|
+
result?: string;
|
|
4182
|
+
/** The sequence number of one streamed partial result; the final answer carries none. */
|
|
4183
|
+
partial?: number;
|
|
4184
|
+
summary: string;
|
|
4185
|
+
receivedat: number;
|
|
4186
|
+
}
|
|
4187
|
+
/** One sandbox render descriptor: the sanitized markup, the per render nonce and the source origin of the untrusted markup. */
|
|
4188
|
+
export interface sandboxrender {
|
|
4189
|
+
id: string;
|
|
4190
|
+
nonce: string;
|
|
4191
|
+
markup: string;
|
|
4192
|
+
sourceorigin: string;
|
|
4193
|
+
stepid: string;
|
|
4194
|
+
renderedat: number;
|
|
4195
|
+
}
|
|
4196
|
+
/** The result of one sandbox render posted back through postmessage: the nonce it answers, the sanitized text and the render facts. */
|
|
4197
|
+
export interface sandboxrenderresult {
|
|
4198
|
+
nonce: string;
|
|
4199
|
+
ok: boolean;
|
|
4200
|
+
text: string;
|
|
4201
|
+
summary: string;
|
|
4202
|
+
at: number;
|
|
4203
|
+
}
|
|
4204
|
+
/** One keepalive run state with start and stop events: the typed run state that holds a runtime port open while a run stays active and emits a heartbeat on every interval. */
|
|
4205
|
+
export interface keepalivestate {
|
|
4206
|
+
runid: string;
|
|
4207
|
+
sessionid: string;
|
|
4208
|
+
state: "active" | "stopped";
|
|
4209
|
+
startedat: number;
|
|
4210
|
+
stoppedat?: number;
|
|
4211
|
+
/** The user configured heartbeat interval in milliseconds; the roadmap documents thirty seconds while the interval stays the user's choice. */
|
|
4212
|
+
interval: number;
|
|
4213
|
+
beats: number;
|
|
4214
|
+
lastbeatat: number;
|
|
4215
|
+
portopen: boolean;
|
|
4216
|
+
events: keepaliveevent[];
|
|
4217
|
+
}
|
|
4218
|
+
/** One keepalive lifecycle event: the start, a heartbeat, the stop or the reattach after a service worker restart. */
|
|
4219
|
+
export interface keepaliveevent {
|
|
4220
|
+
kind: "start" | "heartbeat" | "stop" | "reattach";
|
|
4221
|
+
at: number;
|
|
4222
|
+
detail?: string;
|
|
4223
|
+
}
|
|
4224
|
+
/** One url history entry of a run: the url, the step that navigated and the time it landed in the run record. */
|
|
4225
|
+
export interface urlhistoryentry {
|
|
4226
|
+
url: string;
|
|
4227
|
+
stepid: string;
|
|
4228
|
+
at: number;
|
|
4229
|
+
}
|
|
4230
|
+
/** The provenance attached to every persisted environment event: the origin, the step and the environment it names. */
|
|
4231
|
+
export interface environmentprovenance {
|
|
4232
|
+
origin: string;
|
|
4233
|
+
stepid: string;
|
|
4234
|
+
environment: environmentkind;
|
|
4235
|
+
}
|
|
4236
|
+
/** The persisted run state of one run: the pending step for restart recovery, the url history, the environment and worker turnaround of every step, the keepalive trail and the zombie view. */
|
|
4237
|
+
export interface runstaterecord {
|
|
4238
|
+
runid: string;
|
|
4239
|
+
sessionid: string;
|
|
4240
|
+
planid: string;
|
|
4241
|
+
profileid: string;
|
|
4242
|
+
state: "active" | "recovered" | "reaped" | "completed" | "expired";
|
|
4243
|
+
/** The step that waits when a service worker restart interrupts the run; the executor resumes exactly it. */
|
|
4244
|
+
pendingstepid?: string;
|
|
4245
|
+
urlhistory: urlhistoryentry[];
|
|
4246
|
+
/** The execution environment of every executed step by step id. */
|
|
4247
|
+
environments: Record<string, environmentkind>;
|
|
4248
|
+
/** The worker turnaround of every offloaded step by step id, in milliseconds. */
|
|
4249
|
+
turnarounds: Record<string, number>;
|
|
4250
|
+
keepalive: keepalivestate;
|
|
4251
|
+
/** The provenance of the last persisted environment event. */
|
|
4252
|
+
lastprovenance?: environmentprovenance;
|
|
4253
|
+
updatedat: number;
|
|
4254
|
+
}
|
|
4255
|
+
/** One worker spawn or teardown event recorded beside step outcomes: the worker count of the pool and the reason of the change. */
|
|
4256
|
+
export interface workerevent {
|
|
4257
|
+
id: string;
|
|
4258
|
+
runid: string;
|
|
4259
|
+
kind: "spawn" | "teardown";
|
|
4260
|
+
workers: number;
|
|
4261
|
+
reason: string;
|
|
4262
|
+
provenance: environmentprovenance;
|
|
4263
|
+
at: number;
|
|
4264
|
+
}
|
|
4265
|
+
/** One spawned offscreen document registry entry: the document, its reasons, its justification and its close time. */
|
|
4266
|
+
export interface offscreenregistryentry {
|
|
4267
|
+
document: string;
|
|
4268
|
+
runid: string;
|
|
4269
|
+
reasons: string[];
|
|
4270
|
+
justification: string;
|
|
4271
|
+
createdat: number;
|
|
4272
|
+
closedat?: number;
|
|
4273
|
+
}
|
|
4274
|
+
/** One storage level run lock that holds a session against concurrent runs. */
|
|
4275
|
+
export interface runlock {
|
|
4276
|
+
sessionid: string;
|
|
4277
|
+
runid: string;
|
|
4278
|
+
holder: string;
|
|
4279
|
+
acquiredat: number;
|
|
4280
|
+
/** The user configured lock expiry; an absent expiry keeps the lock until its run releases it. */
|
|
4281
|
+
expiresat?: number;
|
|
4282
|
+
}
|
|
4283
|
+
/** The sealed persistence envelope of one run state: the payload beside its sha-256 integrity digest so tampering with the persisted run state stays detectable at rest. */
|
|
4284
|
+
export interface sealedrunstate {
|
|
4285
|
+
payload: string;
|
|
4286
|
+
algorithm: "sha-256";
|
|
4287
|
+
digest: string;
|
|
4288
|
+
sealedat: number;
|
|
4289
|
+
}
|
|
4290
|
+
/**
|
|
4291
|
+
* Security part one contracts of the 1.1.61 family.
|
|
4292
|
+
* The trust boundary hardens here: automation runs behind a per origin allowlist under a denydefault posture that refuses every ungranted origin, per site originprofiles grant and deny single action kinds, consentwindows bind every grant in time with a named boundary that never defaults to unlimited, revokerun halts a run mid step as a terminal session event, and every decision lands in an immutable append only run log whose loghash chain makes tampering detectable at read time while maskinputs keeps typed secrets out of every record.
|
|
4293
|
+
* The consent gates do not move: every security operation rides the same session, plan and origin review, and no security record ever bypasses the human review.
|
|
4294
|
+
*/
|
|
4295
|
+
/** The sensitive classes of the 1.1.61 family: payment, credential, delete and publish steps each need one fresh consent prompt per class per origin. */
|
|
4296
|
+
export type sensitiveclass = "payment" | "credential" | "delete" | "publish";
|
|
4297
|
+
/** The event kinds of the immutable run log: step transitions, grants, window expiries, revocations, denials, suspensions, resumes and the completion seal. */
|
|
4298
|
+
export type logeventkind = "step" | "grant" | "expiry" | "revoke" | "deny" | "suspend" | "resume" | "seal";
|
|
4299
|
+
/** The hash chain fields of one immutable log entry: the hash of its predecessor, the entry hash written at append time and the algorithm that derives both. */
|
|
4300
|
+
export interface loghash {
|
|
4301
|
+
previous: string;
|
|
4302
|
+
current: string;
|
|
4303
|
+
algorithm: "sha-256";
|
|
4304
|
+
}
|
|
4305
|
+
/** One append only immutable log entry: the run it belongs to, the event kind, the summary in plain language, the origin and step provenance, the time and the hash chain link written at append time with no later rewrite. */
|
|
4306
|
+
export interface immutablelogentry {
|
|
4307
|
+
id: string;
|
|
4308
|
+
runid: string;
|
|
4309
|
+
kind: logeventkind;
|
|
4310
|
+
summary: string;
|
|
4311
|
+
origin: string;
|
|
4312
|
+
/** The step the entry names when it records one step transition, denial or revocation halt. */
|
|
4313
|
+
stepid?: string;
|
|
4314
|
+
at: number;
|
|
4315
|
+
hash: loghash;
|
|
4316
|
+
}
|
|
4317
|
+
/** The sealed completion record of one run log: the entry count, the final hash that chains the seal to the last entry and the seal time; the seal closes the log with no later append. */
|
|
4318
|
+
export interface sealedlog {
|
|
4319
|
+
runid: string;
|
|
4320
|
+
entries: number;
|
|
4321
|
+
sealhash: loghash;
|
|
4322
|
+
sealedat: number;
|
|
4323
|
+
}
|
|
4324
|
+
/** The stored run log of one run: the append only entries beside the seal that closes them at completion; an unsealed log still accepts appends while a sealed log refuses them. */
|
|
4325
|
+
export interface storedrunlog {
|
|
4326
|
+
runid: string;
|
|
4327
|
+
sessionid: string;
|
|
4328
|
+
entries: immutablelogentry[];
|
|
4329
|
+
seal?: sealedlog;
|
|
4330
|
+
updatedat: number;
|
|
4331
|
+
}
|
|
4332
|
+
/** One per site origin profile: the exact origin, the action kinds the user granted and denied on it, and the review times; the profile consults before every sensitive kind. */
|
|
4333
|
+
export interface originprofile {
|
|
4334
|
+
profileid: string;
|
|
4335
|
+
origin: string;
|
|
4336
|
+
grants: actionkind[];
|
|
4337
|
+
denials: actionkind[];
|
|
4338
|
+
createdat: number;
|
|
4339
|
+
updatedat: number;
|
|
4340
|
+
}
|
|
4341
|
+
/** One allowlist entry of automation origins: the exact origin with no wildcard expansion, the profile workspace it belongs to and the grant time; the active tab grant counts as one explicit single origin entry. */
|
|
4342
|
+
export interface automationallowlistentry {
|
|
4343
|
+
origin: string;
|
|
4344
|
+
profileid: string;
|
|
4345
|
+
grantedat: number;
|
|
4346
|
+
}
|
|
4347
|
+
/** One consent window bound in time: the session and the exact origin it scopes, the user chosen duration with the boundary it names, the kinds it covers and the state; the window expires at its duration boundary and never defaults to unlimited. */
|
|
4348
|
+
export interface consentwindow {
|
|
4349
|
+
id: string;
|
|
4350
|
+
sessionid: string;
|
|
4351
|
+
origin: string;
|
|
4352
|
+
startedat: number;
|
|
4353
|
+
/** The user chosen duration in milliseconds; the boundary stays the user's choice with no engine default. */
|
|
4354
|
+
duration: number;
|
|
4355
|
+
expiresat: number;
|
|
4356
|
+
/** The named boundary in plain language such as the duration the prompt offered; the prompt never defaults to unlimited. */
|
|
4357
|
+
boundary: string;
|
|
4358
|
+
kinds: actionkind[];
|
|
4359
|
+
state: "active" | "closed";
|
|
4360
|
+
closedat?: number;
|
|
4361
|
+
}
|
|
4362
|
+
/** One consent scope grant naming the origin, the kinds and the boundary in a single record; the session start writes it into the immutable log. */
|
|
4363
|
+
export interface consentscope {
|
|
4364
|
+
origin: string;
|
|
4365
|
+
kinds: actionkind[];
|
|
4366
|
+
boundary: string;
|
|
4367
|
+
grantedat: number;
|
|
4368
|
+
}
|
|
4369
|
+
/** One mid run revocation: the terminal session event that halts the pending step and every queued step without executing them, the acting user and the reason. */
|
|
4370
|
+
export interface revokerunevent {
|
|
4371
|
+
id: string;
|
|
4372
|
+
sessionid: string;
|
|
4373
|
+
runid: string;
|
|
4374
|
+
haltedstepids: string[];
|
|
4375
|
+
actor: string;
|
|
4376
|
+
reason: string;
|
|
4377
|
+
at: number;
|
|
4378
|
+
}
|
|
4379
|
+
/** One fresh sensitive class consent per origin: the class the user consented to, the grant time and the optional expiry; each sensitive class needs its own fresh prompt per origin. */
|
|
4380
|
+
export interface classconsent {
|
|
4381
|
+
id: string;
|
|
4382
|
+
origin: string;
|
|
4383
|
+
sensitiveclass: sensitiveclass;
|
|
4384
|
+
grantedat: number;
|
|
4385
|
+
expiresat?: number;
|
|
4386
|
+
}
|
|
4387
|
+
/** One mask rule for sensitive field shapes: the documented password, token, card and secret families extended by the user, optionally scoped to one origin. */
|
|
4388
|
+
export interface maskrule {
|
|
4389
|
+
id: string;
|
|
4390
|
+
/** The origin the rule scopes to; an absent origin keeps the rule global. */
|
|
4391
|
+
origin?: string;
|
|
4392
|
+
shapes: string[];
|
|
4393
|
+
createdat: number;
|
|
4394
|
+
}
|
|
4395
|
+
/** One denied step evidence: the origin, the action kind and the deny reason in plain language, recorded without navigation. */
|
|
4396
|
+
export interface deniedevidence {
|
|
4397
|
+
origin: string;
|
|
4398
|
+
kind: string;
|
|
4399
|
+
reason: string;
|
|
4400
|
+
at: number;
|
|
4401
|
+
}
|
|
4402
|
+
/** One revocation evidence of the plan progress: the halted steps and the revoked step the run stopped at. */
|
|
4403
|
+
export interface revocationevidence {
|
|
4404
|
+
haltedstepids: string[];
|
|
4405
|
+
revokedstepid?: string;
|
|
4406
|
+
reason: string;
|
|
4407
|
+
at: number;
|
|
4408
|
+
}
|
|
4409
|
+
/** The security view of the 1.1.61 family served to the sidepanel and the popup: the automation allowlist, the per origin profiles, the active consent windows with their remaining time, the fresh class consents, the revocation history, the mask rules, the per run chain verification status with the seal hash and the denydefault posture notice. */
|
|
4410
|
+
export interface securityview {
|
|
4411
|
+
allowlist: automationallowlistentry[];
|
|
4412
|
+
profiles: originprofile[];
|
|
4413
|
+
windows: consentwindow[];
|
|
4414
|
+
consents: classconsent[];
|
|
4415
|
+
revocations: revokerunevent[];
|
|
4416
|
+
maskrules: maskrule[];
|
|
4417
|
+
chain: Array<{
|
|
4418
|
+
runid: string;
|
|
4419
|
+
valid: boolean;
|
|
4420
|
+
entries: number;
|
|
4421
|
+
brokenat?: number;
|
|
4422
|
+
reason: string;
|
|
4423
|
+
sealhash?: string;
|
|
4424
|
+
sealedat?: number;
|
|
4425
|
+
}>;
|
|
4426
|
+
posture: "denydefault";
|
|
4427
|
+
}
|
|
4118
4428
|
//# sourceMappingURL=types.d.ts.map
|