@wenathlan/extension 1.1.61 → 1.1.63

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.
Files changed (49) hide show
  1. package/README.md +5 -3
  2. package/dist/confirmgates.d.ts +60 -0
  3. package/dist/confirmgates.d.ts.map +1 -0
  4. package/dist/environments.d.ts +10 -0
  5. package/dist/environments.d.ts.map +1 -1
  6. package/dist/inboundguard.d.ts +86 -0
  7. package/dist/inboundguard.d.ts.map +1 -0
  8. package/dist/index.d.ts +8 -1
  9. package/dist/index.d.ts.map +1 -1
  10. package/dist/index.js +1299 -3
  11. package/dist/index.js.map +4 -4
  12. package/dist/memory.d.ts +187 -1
  13. package/dist/memory.d.ts.map +1 -1
  14. package/dist/originpolicy.d.ts +10 -0
  15. package/dist/originpolicy.d.ts.map +1 -1
  16. package/dist/phishguard.d.ts +24 -0
  17. package/dist/phishguard.d.ts.map +1 -0
  18. package/dist/policy.d.ts +122 -1
  19. package/dist/policy.d.ts.map +1 -1
  20. package/dist/protocol.d.ts +88 -0
  21. package/dist/protocol.d.ts.map +1 -1
  22. package/dist/redactshots.d.ts +54 -0
  23. package/dist/redactshots.d.ts.map +1 -0
  24. package/dist/secretvault.d.ts +89 -0
  25. package/dist/secretvault.d.ts.map +1 -0
  26. package/dist/sessioninterface.d.ts +213 -0
  27. package/dist/sessioninterface.d.ts.map +1 -0
  28. package/dist/transparency.d.ts +46 -0
  29. package/dist/transparency.d.ts.map +1 -0
  30. package/dist/types.d.ts +368 -3
  31. package/dist/types.d.ts.map +1 -1
  32. package/dist/version.d.ts +1 -1
  33. package/extension/dist/background.js +1710 -55
  34. package/extension/dist/background.js.map +4 -4
  35. package/extension/dist/manifest.json +5 -1
  36. package/extension/dist/offscreen.js +4 -0
  37. package/extension/dist/offscreen.js.map +2 -2
  38. package/extension/dist/pagebridge.js.map +2 -2
  39. package/extension/dist/popup.html +1 -1
  40. package/extension/dist/popup.js +41 -0
  41. package/extension/dist/popup.js.map +2 -2
  42. package/extension/dist/sidepanel.html +1 -1
  43. package/extension/dist/sidepanel.js +462 -215
  44. package/extension/dist/sidepanel.js.map +3 -3
  45. package/extension/dist/transparencypage.html +25 -0
  46. package/extension/dist/transparencypage.js +198 -0
  47. package/extension/dist/transparencypage.js.map +7 -0
  48. package/extension/manifest.json +5 -1
  49. package/package.json +1 -1
package/dist/types.d.ts CHANGED
@@ -1,9 +1,9 @@
1
- export declare const protocolversion: "1.1.61";
1
+ export declare const protocolversion: "1.1.63";
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" | "environment" | "worker" | "sandbox" | "grant" | "expiry" | "revoke" | "deny" | "seal" | "mask";
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" | "vault" | "gate" | "phish" | "defer" | "schema" | "inbound" | "transparency" | "notes" | "scratchpad" | "summary" | "recall" | "correction" | "consentmemory" | "cancel" | "search";
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 {
@@ -222,8 +222,28 @@ export interface runsettings {
222
222
  consentduration?: number;
223
223
  /** Retention window for stored sealed run logs; an absent window keeps every sealed log while the chain verification summaries always survive. */
224
224
  logretention?: number;
225
+ /** The phishguard lookalike distance threshold between zero and one the user chooses; a login origin whose distance to a granted origin crosses the threshold blocks the step. */
226
+ phishdistance?: number;
227
+ /** The freshness window of stored phishguard verdicts in milliseconds; an absent window keeps every verdict fresh while the records always survive for the audit trail. */
228
+ phishfreshness?: number;
225
229
  /** 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
230
  maskshapes?: string[];
231
+ /** Retention window for stored site notes; an absent window keeps every note. */
232
+ noteretention?: number;
233
+ /** Retention window for scratchpad entries; an absent window keeps every entry. */
234
+ scratchpadretention?: number;
235
+ /** Retention window for stored run summaries; an absent window keeps every summary. */
236
+ summaryretention?: number;
237
+ /** Retention window for stored correction memory entries; an absent window keeps every correction. */
238
+ correctionretention?: number;
239
+ /** The semantic recall index window in milliseconds; an entry older than the window leaves the live index while its records stay. */
240
+ recallwindow?: number;
241
+ /** True when historysearch index building stays on; an absent value keeps the incremental index on. */
242
+ historyindex?: boolean;
243
+ /** The user cancelrun rollback preference: queued rolls the queued steps back while none stops the run without a rollback. */
244
+ cancelrollback?: "queued" | "none";
245
+ /** The runsummary length window in steps the distillation keeps; an absent window keeps every step with no fixed cap. */
246
+ summarywindow?: number;
227
247
  }
228
248
  export interface proposalrequest {
229
249
  objective: string;
@@ -250,6 +270,8 @@ export interface planprogress {
250
270
  environments?: Record<string, environmentkind>;
251
271
  /** The worker turnaround of every offloaded step by step id, in milliseconds. */
252
272
  turnarounds?: Record<string, number>;
273
+ /** The gate wait of every gated step by step id: the confirm gate the step waited at with its waited milliseconds. */
274
+ gatewaits?: Record<string, gatewaitevidence>;
253
275
  /** Prior progress snapshots preserved when a new plan replaces the tracked one. */
254
276
  prior?: planprogress[];
255
277
  updatedat: number;
@@ -1146,6 +1168,10 @@ export interface shotrecord {
1146
1168
  annotated?: boolean;
1147
1169
  exporttarget?: captureexport;
1148
1170
  target?: string;
1171
+ /** True when redactshot regions covered the capture before storage; the masked regions never reach the stored bytes. */
1172
+ redacted?: boolean;
1173
+ /** The count of redactshot regions the capture seam masked before storage. */
1174
+ redactedregions?: number;
1149
1175
  /** True once the retention window expired the bytes; the metadata stays for the audit trail. */
1150
1176
  bytesexpired?: boolean;
1151
1177
  }
@@ -4295,7 +4321,7 @@ export interface sealedrunstate {
4295
4321
  /** 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
4322
  export type sensitiveclass = "payment" | "credential" | "delete" | "publish";
4297
4323
  /** 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";
4324
+ export type logeventkind = "step" | "grant" | "expiry" | "revoke" | "deny" | "suspend" | "resume" | "seal" | "gate" | "phish" | "schema" | "inbound" | "cancel";
4299
4325
  /** 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
4326
  export interface loghash {
4301
4327
  previous: string;
@@ -4424,5 +4450,344 @@ export interface securityview {
4424
4450
  sealedat?: number;
4425
4451
  }>;
4426
4452
  posture: "denydefault";
4453
+ /** The open and resolved confirm gates of the 1.1.62 family with their payloads and human action provenance. */
4454
+ gates?: confirmgate[];
4455
+ /** The gate resolution events with their human action provenance. */
4456
+ resolutions?: gateresolution[];
4457
+ /** The deferred automation commands waiting for their ratelimit bucket reset. */
4458
+ deferred?: deferredevent[];
4459
+ /** The stored phishguard verdicts with their distance scores. */
4460
+ phishverdicts?: phishverdict[];
4461
+ /** The secretvault metadata with labels and scopes only; the values never leave the vault seam. */
4462
+ vault?: secretvaultentry[];
4463
+ /** The connectallow entries of external senders; the list ships empty by default. */
4464
+ connectallow?: connectallowentry[];
4465
+ /** The safedefaults applications with their first seen origins. */
4466
+ safedefaults?: safedefaultapplication[];
4467
+ /** The redactshot regions per origin and page template with their geometry and reason. */
4468
+ redactregions?: redactregion[];
4469
+ }
4470
+ /**
4471
+ * Security part two contracts of the 1.1.62 family.
4472
+ * The protections for secrets, messages and money live here: the secretvault keeps passwords and tokens behind a vault seam with only labels, scopes, provenance and digests persisting, redactshots mask sensitive capture regions across every capture kind, schemastrict rejects every inbound command field the grammar never declared, origincheck and connectallow guard every runtime message and port connection while dropping unknown senders, ratelimit buckets bound automation commands per origin and per session with deferral until the window resets, confirmpay, confirmdelete and confirmcreds put one distinct human action in front of payments, deletions and credential use with no batch approval and no timeout, phishguard watches login targets for lookalike origins against the granted origins under the user threshold, safedefaults profile unknown origins as reads only, and permdiff records every installed permission change for the transparencypage.
4473
+ * 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.
4474
+ */
4475
+ /** The provenance of one secretvault record: the user typed the secret, or a reviewed session step stored it. */
4476
+ export type secretprovenance = "user" | "session";
4477
+ /** One secretvault record: the label, the exact origin scope, the profile workspace, the provenance and the sha-256 verification digest; the value itself lives behind the vault seam and never persists in any storage area, log or export. */
4478
+ export interface secretvaultentry {
4479
+ vaultid: string;
4480
+ label: string;
4481
+ scope: string;
4482
+ profileid: string;
4483
+ provenance: secretprovenance;
4484
+ algorithm: "sha-256";
4485
+ digest: string;
4486
+ createdat: number;
4487
+ lastusedat?: number;
4488
+ }
4489
+ /** The vault seam the background implements: values enter and leave through put, fetch and drop only, so no plaintext value ever reaches a storage writer, a log entry or an export path. */
4490
+ export interface vaultseam {
4491
+ put(vaultid: string, value: string): Promise<void>;
4492
+ fetch(vaultid: string): Promise<string | undefined>;
4493
+ drop(vaultid: string): Promise<void>;
4494
+ }
4495
+ /** One redactshot region: the geometry on the capture surface in css pixels, the plain language reason and whether the user drew it or a sensitive field shape derived it. */
4496
+ export interface redactregion {
4497
+ id: string;
4498
+ origin: string;
4499
+ template: string;
4500
+ x: number;
4501
+ y: number;
4502
+ width: number;
4503
+ height: number;
4504
+ reason: string;
4505
+ source: "fieldshape" | "userdrawn";
4506
+ createdat: number;
4507
+ }
4508
+ /** The capture surfaces redactshots covers: viewport, element and stitched captures alike. */
4509
+ export type capturesurface = "viewport" | "element" | "stitched";
4510
+ /** One schemastrict error: the path inside the command, the expected shape, the found shape and the reason in plain language; the error echoes no payload. */
4511
+ export interface schemaerror {
4512
+ path: string;
4513
+ expected: string;
4514
+ found: string;
4515
+ reason: string;
4516
+ }
4517
+ /** One origincheck verdict of an inbound runtime message or port connection: accepted, or dropped with the sender and its origin named. */
4518
+ export interface origincheckverdict {
4519
+ accepted: boolean;
4520
+ sender: string;
4521
+ origin: string;
4522
+ reason: string;
4523
+ }
4524
+ /** One connectallow entry: the external sender the user allowed with its display name and optional origin; the list ships empty by default and holds user managed entries only. */
4525
+ export interface connectallowentry {
4526
+ senderid: string;
4527
+ displayname: string;
4528
+ origin?: string;
4529
+ addedat: number;
4530
+ }
4531
+ /** One ratelimit bucket of automation commands per origin and per session: the user configured bound and window, the used count, the window start and the reset time. */
4532
+ export interface ratelimitbucket {
4533
+ origin: string;
4534
+ sessionid: string;
4535
+ limit: number;
4536
+ window: number;
4537
+ used: number;
4538
+ windowstartedat: number;
4539
+ resetsat: number;
4540
+ }
4541
+ /** One deferred command event: the step the bucket deferred, the reason and the reset time it waits for. */
4542
+ export interface deferredevent {
4543
+ id: string;
4544
+ stepid: string;
4545
+ kind: string;
4546
+ origin: string;
4547
+ reason: string;
4548
+ resetsat: number;
4549
+ at: number;
4550
+ }
4551
+ /** The gated step families of the 1.1.62 family: payments, destructive deletions and credential use each pause in front of a human. */
4552
+ export type gatekind = "confirmpay" | "confirmdelete" | "confirmcreds";
4553
+ /** One confirm gate: the step it holds, the payload the human reviews and the state only one explicit human action resolves; no timeout ever resolves a gate and no batch approval resolves two. */
4554
+ export interface confirmgate {
4555
+ gateid: string;
4556
+ kind: gatekind;
4557
+ stepid: string;
4558
+ runid: string;
4559
+ origin: string;
4560
+ /** confirmpay carries the amount, the payee origin and the target element; confirmdelete carries the target, the scope and the irreversibility; confirmcreds carries the credential label only, never its value. */
4561
+ payload: Record<string, string>;
4562
+ state: "open" | "resolved" | "refused";
4563
+ openedat: number;
4564
+ resolvedat?: number;
4565
+ actor?: string;
4566
+ }
4567
+ /** One gate resolution event with its human action provenance: one gate, one decision, one acting user. */
4568
+ export interface gateresolution {
4569
+ gateid: string;
4570
+ kind: gatekind;
4571
+ stepid: string;
4572
+ decision: "resolved" | "refused";
4573
+ actor: string;
4574
+ at: number;
4575
+ }
4576
+ /** One gate wait evidence of the progress log: the gate the step waited at and the milliseconds it waited. */
4577
+ export interface gatewaitevidence {
4578
+ gateid: string;
4579
+ kind: string;
4580
+ openedat: number;
4581
+ resolvedat: number;
4582
+ waitedms: number;
4583
+ }
4584
+ /** One phishguard verdict: the login origin checked, the closest granted origin with the lookalike distance, the user threshold and the block decision that names the matched origin. */
4585
+ export interface phishverdict {
4586
+ origin: string;
4587
+ matchedorigin?: string;
4588
+ distance: number;
4589
+ threshold: number;
4590
+ blocked: boolean;
4591
+ reason: string;
4592
+ at: number;
4593
+ }
4594
+ /** One permdiff record between two installed permission versions: the added and removed permissions with the computed time. */
4595
+ export interface permdiffrecord {
4596
+ fromversion: string;
4597
+ toversion: string;
4598
+ added: string[];
4599
+ removed: string[];
4600
+ computedat: number;
4601
+ }
4602
+ /** One safedefaults application: the unknown origin that received the reads only profile with its first seen time. */
4603
+ export interface safedefaultapplication {
4604
+ origin: string;
4605
+ firstseenat: number;
4606
+ }
4607
+ /** One transparency grant row of the transparencypage: the origin, the scope, the boundary and the revoke action it offers. */
4608
+ export interface transparencygrant {
4609
+ origin: string;
4610
+ scope: string;
4611
+ boundary: string;
4612
+ grantedat: number;
4613
+ }
4614
+ /**
4615
+ * Session interface contracts of the 1.1.63 family.
4616
+ * The session becomes the primary interface here: sitenotes keep one note record per origin with title, body and author provenance while sensitive bodies seal at rest, the scratchpad holds append only entries per task with step provenance, runsummary distills a completed run into the origins visited, the kinds executed and the per step outcomes inside the user configured window, semanticrecall embeds past extraction records into a local fingerprint indexed corpus ranked by text similarity with run and step provenance, correctionmemory captures every plan review edit and rejection per origin and kind, consentmemory keeps every grant, denial, expiry and revocation per origin as advisory history that never auto grants, sessiongrid rows derive from the existing session stores with no new state, historysearch indexes session metadata, notes and summaries into one incremental corpus, errorsurface classifies every failed step cause as page, network, policy or gate with a retry hint carrying the policy verdict, and cancelrun rolls the queued steps back only while the executed steps stay untouched in the sealed log.
4617
+ * The consent gates do not move: every interface action rides the same session, plan and origin review, and no interface surface ever bypasses the human review.
4618
+ */
4619
+ /** One site note per origin: the title, the plain or sealed body, the author provenance and the timestamps; a sensitive note seals its body at rest so the plain text never persists. */
4620
+ export interface sitenote {
4621
+ id: string;
4622
+ origin: string;
4623
+ title: string;
4624
+ /** The plain body of a non sensitive note; a sensitive note carries its sealedbody instead. */
4625
+ body?: string;
4626
+ /** The locally sealed body of a sensitive note; the sealing stays an at rest measure and never replaces the user keychain. */
4627
+ sealedbody?: string;
4628
+ author: string;
4629
+ sensitive: boolean;
4630
+ createdat: number;
4631
+ updatedat: number;
4632
+ }
4633
+ /** One append only scratchpad entry of one task: the text, its optional step provenance and the timestamp. */
4634
+ export interface scratchpadentry {
4635
+ id: string;
4636
+ taskid: string;
4637
+ sessionid: string;
4638
+ text: string;
4639
+ /** The step the entry was written beside; an entry the user writes carries none. */
4640
+ stepid?: string;
4641
+ author: string;
4642
+ at: number;
4643
+ }
4644
+ /** One distilled run summary of a completed run: the origins visited, the kinds executed, the per step outcomes inside the user configured window and the distillation provenance that names the offscreen worker task. */
4645
+ export interface runsummary {
4646
+ runid: string;
4647
+ sessionid: string;
4648
+ origins: string[];
4649
+ kinds: string[];
4650
+ steps: Array<{
4651
+ stepid: string;
4652
+ kind: string;
4653
+ ok: boolean;
4654
+ summary: string;
4655
+ }>;
4656
+ /** The user configured step window the summary keeps; an absent window keeps every step with no fixed cap. */
4657
+ window?: number;
4658
+ task: "runsummary";
4659
+ /** The distillation provenance: the offscreen worker pool or the inline fallback beside the page. */
4660
+ provenance: "offscreenworker" | "inline";
4661
+ distilledat: number;
4662
+ }
4663
+ /** One semantic recall query: the text to recall and the optional origin scope that stays inside the run scope. */
4664
+ export interface recallquery {
4665
+ text: string;
4666
+ origin?: string;
4667
+ /** The user chosen match limit; an absent limit keeps every ranked match. */
4668
+ limit?: number;
4669
+ }
4670
+ /** One semantic recall index entry: the extraction fingerprint, the origin, the run and step provenance and the indexed text. */
4671
+ export interface recallindexentry {
4672
+ fingerprint: string;
4673
+ origin: string;
4674
+ runid: string;
4675
+ stepid: string;
4676
+ text: string;
4677
+ at: number;
4678
+ }
4679
+ /** One ranked semantic recall match: the indexed entry, the text similarity score and the plain language reason. */
4680
+ export interface recallmatch {
4681
+ entry: recallindexentry;
4682
+ score: number;
4683
+ reason: string;
4684
+ }
4685
+ /** One correction memory entry: the plan review edit or rejection captured per origin and kind, linking the step to its correction. */
4686
+ export interface correctionentry {
4687
+ id: string;
4688
+ origin: string;
4689
+ kind: string;
4690
+ stepid: string;
4691
+ source: "edited" | "rejected";
4692
+ /** The step shape before the correction. */
4693
+ original: string;
4694
+ /** The corrected step shape; a rejected step carries none. */
4695
+ corrected?: string;
4696
+ reason: string;
4697
+ at: number;
4698
+ }
4699
+ /** One consent memory entry per origin: the grant, denial, expiry or revocation decision with its boundary, its kinds and its optional expiry; the record stays advisory and never auto grants. */
4700
+ export interface consentmemoryentry {
4701
+ id: string;
4702
+ origin: string;
4703
+ decision: "grant" | "deny" | "expire" | "revoke";
4704
+ boundary: string;
4705
+ kinds: string[];
4706
+ at: number;
4707
+ /** The expiry the decision carried; an absent expiry keeps the record as history only. */
4708
+ expiresat?: number;
4709
+ }
4710
+ /** One session grid row derived from the session stores with no new state: the session and run ids, the origin set, the live or saved state, the outcome, the step counts, the per tab lock state, the seal hash link of the sealed log chain and the actions the row offers. */
4711
+ export interface sessiongridrow {
4712
+ sessionid: string;
4713
+ runid: string;
4714
+ origins: string[];
4715
+ state: "live" | "saved";
4716
+ outcome: string;
4717
+ steps: number;
4718
+ completed: number;
4719
+ lock: "held" | "free";
4720
+ tabid?: number;
4721
+ sealhash?: string;
4722
+ updatedat: number;
4723
+ actions: Array<"resume" | "cancelrun" | "reopen">;
4724
+ }
4725
+ /** One history search query: the text with the optional origin, time range and outcome filters. */
4726
+ export interface historysearchquery {
4727
+ text: string;
4728
+ origin?: string;
4729
+ from?: number;
4730
+ to?: number;
4731
+ outcome?: string;
4732
+ }
4733
+ /** The corpus sources historysearch indexes: session metadata, site notes and run summaries in one corpus. */
4734
+ export type historysource = "session" | "note" | "summary";
4735
+ /** One history search corpus entry written incrementally on each store write. */
4736
+ export interface historyindexentry {
4737
+ source: historysource;
4738
+ id: string;
4739
+ origin?: string;
4740
+ title: string;
4741
+ text: string;
4742
+ outcome?: string;
4743
+ at: number;
4744
+ }
4745
+ /** One history search hit with the matched terms highlighted and the sealed run link. */
4746
+ export interface historysearchhit {
4747
+ source: historysource;
4748
+ id: string;
4749
+ title: string;
4750
+ excerpt: string;
4751
+ highlights: string[];
4752
+ origin?: string;
4753
+ outcome?: string;
4754
+ at: number;
4755
+ }
4756
+ /** The cause classes of one error surface: the page, the network, the policy or a confirm gate. */
4757
+ export type errorcause = "page" | "network" | "policy" | "gate";
4758
+ /** One error surface payload of a failed step: the cause class, the message in plain language, the retry hint with its policy verdict and the context facts. */
4759
+ export interface errorsurface {
4760
+ stepid: string;
4761
+ runid: string;
4762
+ cause: errorcause;
4763
+ message: string;
4764
+ retry: {
4765
+ allowed: boolean;
4766
+ reason: string;
4767
+ };
4768
+ context: Record<string, string>;
4769
+ at: number;
4770
+ }
4771
+ /** The rollback option descriptor of a cancelrun action: the queued steps it rolls back while the executed steps stay untouched. */
4772
+ export interface rollbackdescriptor {
4773
+ scope: "queued" | "none";
4774
+ label: string;
4775
+ queuedstepids: string[];
4776
+ }
4777
+ /** The cancelrun action of one run: the run and the session it stops with its rollback option descriptor. */
4778
+ export interface cancelrunaction {
4779
+ runid: string;
4780
+ sessionid: string;
4781
+ rollback: rollbackdescriptor;
4782
+ }
4783
+ /** The empty state surfaces of the session interface: the session grid, the history search box, the site notes and the scratchpad. */
4784
+ export type emptystatesurface = "sessiongrid" | "historysearch" | "sitenotes" | "scratchpad";
4785
+ /** One per tab session reference that isolates parallel tabs: the tab, its session, its optional run and its origin. */
4786
+ export interface tabsessionref {
4787
+ tabid: number;
4788
+ sessionid: string;
4789
+ runid?: string;
4790
+ origin: string;
4791
+ updatedat: number;
4427
4792
  }
4428
4793
  //# sourceMappingURL=types.d.ts.map