Skip to content

Releases

WebSense 2.0.0

Choose a tag to compare

@spliffspliff70-wq spliffspliff70-wq released this 01 Oct 19:57
  • 7 listed tools (browse, find, act, page_slice, tabs, debug, websense_guide); 30 registered but unlisted.
  • browse returns an INDEX over a lossless inventory, find answers WHERE + WHAT, act acts, and every mutating action returns a grouped diff with a cached FULL DIFF handle.
  • Trusted input: act{how:trusted} sends real isTrusted events in a background tab; trusted drag now fires a real drop; same-origin iframes are walked and clickable.
  • Content-script dispatcher unified: 0 duplicated ops (57 relay cases -> 9 tab-relay), removing the drift that produced dead fixes.

Known limits: OS-click equivalence unproven (real_click is the only genuine OS path); Chrome-only; main_world needs Allow User Scripts.

v1.4.7 - per-session state, E# ref-drift caveat retired (measured false), stale-CS disconnect fix

Choose a tag to compare

@spliffspliff70-wq spliffspliff70-wq released this 25 Sep 11:13

1.4.7

  • Session state is per-session. session{action:"reset"} no longer wipes other jobs. The
    SessionManager was a module-scope singleton by accident; it is now resolved per MCP session
    through the context that already existed for tab isolation. Verified with two concurrent
    sessions: A's reset took it 1 -> 0 steps while B stayed at 1, unchanged.
  • The "E# refs renumber" caveat is retired — it was measured false. Two full explores: 41/41
    refs pointed at the same elements. After a scroll: 0 changed. After a framework re-render:
    0 changed. With the node fully replaced (identical label, no id, no class) the stale ref healed
    onto the new node and the click landed on the replacement. assignRef() caches per element, so
    a ref is held by element identity, not scan position.
  • Hub: a disconnecting stale content script no longer unregisters the tab's NEW client. The
    close handler deleted the contentByTab entry unconditionally, so a superseded content script
    finally disconnecting wiped the new client's registration for the same tab, and page ops fell
    through to the offscreen instead of the live content script. Measured as page_state reporting
    zero dialogs and explore_page returning zero actions while the correct client was connected and
    healthy. The mapping is now removed only when it still points at that socket. Companion fix in
    the same block: eviction re-points contentClient/mainFrameClient at the new client instead of
    nulling them.
  • Docs: CHANGELOG returned to Keep-a-Changelog shape; CONTRIBUTING brought up to date.
  • Line endings: .gitattributes added and the content-script builder made line-ending
    agnostic, so a Windows checkout no longer produces a spurious diff on the built artifact.

1.4.6

  • The page's own JS dialogs are now captured. The content script had overridden
    window.alert/confirm/prompt in its ISOLATED world; page code runs in the MAIN world and never
    touched those copies. A page's dialog was therefore invisible: status reported
    pendingDialogs:[] while a confirm() was blocking, and in a background tab Chrome silently
    auto-dismissed it so the page just continued. An agent could report a destructive step as
    successful when the user would have been asked. Fixed with a MAIN-world document_start hook
    (extension/dialog-hook.js). Live-proven both directions: accept -> the page's promise got
    true; dismiss -> false; prompt -> the supplied value. status gained recentDialogs for
    dialogs that already fired. Confirm/prompt auto-answer after 30s so a page can never wedge.
  • evaluate{script} is async-capable. The MAIN-world fallback serialized a Promise to {}
    (JSON.stringify), so async scripts came back empty. The value is now resolved in the page and
    read back through a side channel. Statement blocks return their last expression, and a real
    script error is reported as itself.
  • Routing: main_world_exec is no longer treated as tab-management, so it receives the
    session's bound tab.
  • CI: fixed the CRLF bugs that failed every push.

1.4.5

Full 31-tool live audit; twelve defects fixed, each verified before the next.

  • Truth: the action effect verdict no longer reads unverifiable for every relayed action;
    OS-input escalation is gated on a measured no-op; mutated:false no longer claims an action
    failed.
  • Now working (previously never did): network_log captures page traffic, wait{selector}
    succeeds, reveal kind:"dropdown" resolves, status kind:"doctor" reports a live service
    worker, navigate/tabs frames honor tabId, batch type_text counters are honest,
    extension_reload really reloads, respawn_offscreen stops reporting false failures.
  • Privacy: password/OTP values are masked on every surface that can echo them.
  • Docs: the in-tool guide and README state the measured behavior; MODEL_PROMPT.md is
    generated from the guide with a test that fails on drift.

v1.4.6 — page JS dialogs captured, async evaluate, CI green

Choose a tag to compare

@spliffspliff70-wq spliffspliff70-wq released this 25 Sep 10:53

JS dialogs are now visible, evaluate{script} handles async, and CI is green
again.

JS dialogs — the page's own alert/confirm/prompt are now captured

The content script overrode window.alert/confirm/prompt in its isolated
world. Page code runs in the main world and never touched those copies, so a
page's own dialog was invisible: status reported pendingDialogs: [] while a
confirm() was blocking the page — and in a background tab Chrome silently
auto-dismissed the native dialog, so the page just continued. That is a
silent-wrong-outcome class, not a missing feature: an agent could report a
destructive step as successful when the user would have been asked about it.

A MAIN-world hook (extension/dialog-hook.js, registered the same way as the
console and network hooks) now shadows the three functions and publishes them to
a DOM attribute the content script reads. dialog action:"accept"|"dismiss"
resolves them, and the answer really reaches the page:

  • confirm → the page's promise resolves true (accept) or false (dismiss)
  • prompt → the page's promise resolves the supplied value
  • alert → recorded in status.recentDialogs with its message

status gained recentDialogs: dialogs that already fired, including ones that
were auto-answered. alert() is synchronous, so the page continues the instant
it is raised — the agent needs to know it happened, not that it is waiting.
Confirm/prompt still auto-answer after 30s so the page can never wedge.

evaluate{script} — async, statements, and honest errors

The script-mode fallback to the MAIN world works end to end:

  • async scripts now resolve in the page and are read back, so
    new Promise(r => setTimeout(() => r("OK"), 250)) returns "OK". Previously
    a promise serialized to {} and you had to hand-roll polling.
  • statement blocks return their last expression's value (var x = 7; x * 6
    → 42).
  • real script errors are reported as themselves (script threw: Cannot read properties of null) instead of being masked by the CSP error.

Also fixed on the way: main_world_exec was listed among the tab-management ops,
so it was never stamped with the session's bound tab and the fallback died with
main_world_exec: tabId required.

CI — the repo had been failing on every push since 07:00

There was no .gitattributes and the Windows checkout ran with
core.autocrlf=true, so a fresh Linux checkout produced LF while the committed
artifact was CRLF. The "artifact is in sync with a fresh build" guard therefore
failed in CI (126 passed, 2 failed) while passing locally. Added .gitattributes
pinning the generated artifact and its sources to LF, and made
tools/export-guide.mjs normalize line endings before comparing (the mirror was
stale in CI for the same reason). Verified in a clean LF-only clone before
pushing.

v1.4.5 — twelve defects from the 31-tool live audit

Choose a tag to compare

@spliffspliff70-wq spliffspliff70-wq released this 25 Sep 07:22

A full 31-tool live audit against a controlled workbench (60+ verdicts, every
failure root-caused in source) turned up twelve real defects — including three
where the shipped guide and the regression suite itself taught the wrong
thing
. All twelve are fixed here, each one verified live before the next.

The audit's working documents (the code map, the per-tool verdict table, the
guide cross-check) are intentionally not published. They describe the
pre-1.4.5 code as current, which would mislead anyone reading them after this
release, and they carried local detail (home paths, live tab IDs, the
operator's own tab titles) that has no business in a public repo. The
CHANGELOG entry below is the durable record; the CHANGES themselves and their
regression tests are the proof.

The wrong-truth class (the expensive ones)

  • effect was unverifiable for every relayed action. classifyEffect read
    beforeState/afterState off the top-level result, but the relay wraps
    payloads as {type,id,success,data:{…}} — so the states were never found and
    the verdict was always "could not measure". A mutating click now reports
    confirmed, a genuinely inert one reports suspected_noop.
  • The false-escalation trap. Any non-confirmed verdict (including
    "unverifiable") told the agent to escalate to a real OS-level click. Every
    async handler, download, _blank open and focus-only click landed while the
    verdict said "retry with OS input" — the focus-steal loop. OS input is now
    recommended only for a measured no-op; unverifiable recommends re-reading
    the page.
  • mutated:false no longer claims the action failed. The diff fingerprints
    interactive elements only, so text changes elsewhere, handlers that settle
    after the diff, focus-only clicks, downloads and new-tab opens all report
    mutated:false while genuinely landing. The hint now states what it measured
    and points at a real read. A regression test that required the old
    "NOT LANDED" wording was itself pinning the false claim.

Functionality that never worked

  • network_log captured nothing. The fetch/XHR hooks patched the isolated
    world, which page code never touches — 4 runs, 0 entries, while oracles proved
    traffic. A new network-hook.js registers in the MAIN world (exactly as
    console-hook.js already did) and the reader merges both logs: live, 2/2 real
    page requests captured. totalCaptured is now read before clearing, so a
    clear:true call no longer reports a permanent zero.
  • wait{selector} could never succeed. The branch sent an eval probe,
    expected it CSP-blocked, and only then sent the no-eval safe-query form. The
    extension's own MV3 CSP blocks the probe on every page, so the fallback was
    never sent — measured 1 send per poll and a clean timeout for a selector that
    evaluate{query} proves exists. The no-eval path is now asked first; all four
    wait modes verified.
  • reveal{kind:dropdown} failed on every direct-WS page — the bridge passed a
    pre-resolved element to a reader that resolves internally, so the second
    resolve always missed. Same bug in tab_contents/accordion_contents.
  • status{kind:"doctor"} always reported a service-worker error
    (Unknown content action: doctor_sw) — the server sent an op name the SW never
    had, and it wasn't in the SW-routed set either.
  • navigate and tabs{action:"frames"} silently dropped the tabId you
    passed
    — frames reported the active tab's iframes while claiming success.
    Both now take and honor tabId.
  • type_text batch counters were always wrong (filled:0, failed:N): the
    batch called the async nativeType synchronously, so r.success was always
    undefined. Batch now awaits, heals stale refs, and reports verified counts.
  • extension_reload usually did nothing while reporting success. It called
    chrome.runtime.reload() from the offscreen document, where the API is
    unavailable (the throw was swallowed), and the SW's version relied on a
    setTimeout that a suspending worker never ran. It now relays to the SW and
    reloads synchronously — reloadVerified:true in ~400ms, repeatedly.
  • respawn_offscreen always reported "Extension disconnected" for a respawn
    that had actually succeeded, because the offscreen awaited its own death before
    replying. It now replies first, and routing prefers a live content script.

Privacy

Password/OTP values were echoed back in six places: the label fallback, the
type_text result (actualValue + expected), evaluate{query} value/html
reads, the inputs/state readers, the explore action list, and the forms
section. All are masked now (value:"" plus hasValue/*Masked flags, so
"is it filled?" still works). A canary sweep across 11 tool surfaces returns
zero occurrences.

real_input.py activate-tab — a silent lie, now verified and self-checking

activate-tab used TabItem.click_input(), which silently no-ops on Chrome
tab items
— and the script still exited 0 with {"success": true}. A caller
had no way to detect that nothing had happened. A/B tested against real Chrome:
click_input() left the active tab unchanged while reporting success;
select() (SelectionItemPattern) actually switched it. It now also verifies
the match appears in the post-activation window title and returns
success:false (exit 1) when it does not, so the failure is detectable instead
of silent. (This is a second activate-tab fix — the circular---gate bug
fixed earlier is already in the published file.)

Guide and tests

The guide now states the one-profile/per-tab isolation model, the ref lifecycle
(E# renumbers per explore and rots across re-renders — prefer CSS refs), that
press_key performs no default browser actions, that evaluate{script} is
blocked on every page (the extension's own CSP, not "strict sites"), that JS
dialogs are not a reliable surface, and that session state is global. 12 new
static assertions pin these so a false claim cannot ship again.

MODEL_PROMPT.md is now generated, not hand-maintained. It was a mirror of
a 21-tool guide the server had already replaced, so it kept teaching the false
doctrines long after the guide itself was fixed. tools/export-guide.mjs
extracts the live websense_guide text from src/server.js; --check runs in
npm test, so the mirror and the served prompt can never diverge silently
again. One existing test had been pinning that divergence (it demanded an exact
uppercase string only the hand-edited copy produced) — now case-insensitive.

Tests: 113 → 127.

v1.1.1 — plain-language README, screenshot fix

Choose a tag to compare

@spliffspliff70-wq spliffspliff70-wq released this 31 Aug 14:33

WebSense MCP v1.1.1

Fixed

  • screenshot failed on background tabs — now falls back to chrome.debugger Page.captureScreenshot on the bound tab. Visible-tab path unchanged.

README

  • New "WebSense in plain language" section — non-technical explanation of what WebSense does and how (Chrome extension + localhost server made explicit)
  • New Credits section — design ideas borrowed from agentreach (upload-confirmation doctrine, diagnostics), Hermes Agent (event-push supervisor, goal-aware reads, after-action verify), the computer-use ecosystem (effect-verdict escalation ladder), and Playwright/Puppeteer (locator chains). Ideas re-implemented, no code copied.
  • Known Limitations re-verified via a full 24-tool audit — the screenshot limitation is fixed, Chrome-only and remaining trade-offs documented

Full changelog: https://github.com/spliffspliff70-wq/websense-mcp/blob/main/CHANGELOG.md

v1.1.0 — Bugfix wave

Choose a tag to compare

@spliffspliff70-wq spliffspliff70-wq released this 31 Aug 14:01

WebSense MCP v1.1.0

First bugfix wave from the OSS smoke test (memory-wiped agent, cold start) + full 24-tool surface sweep.

Fixed

  • Below-fold clicks die with Element not found — refs are now stable across explores (refCounter no longer resets), and resolveRefHealed retries with a full SAG rebuild before giving up
  • explore_page{intent} returned 0 matches for label-only elements — intent now also matches element label text + href
  • Stale pageConnected:false — bridge status now falls back to the session's last-known URL on probe timeout (pageProbe field added)
  • Foreground steals — auto-climb real-click now refuses to fire when the OS foreground window is not Chrome (checks GetForegroundWindow → Get-Process)
  • form{action:'state'} was a dead tool — getFormState was referenced but never implemented; now works (also resolves by form id)
  • reveal{kind:'tabs'|'accordion'}, dialog{action}, clipboard read, get_status on the direct-WS bridge — missing cases added; full bridge parity

Verification

  • 42/42 regression tests
  • Full 24-tool sweep on live Chrome: all tools exercised, 4 dead/broken paths found and fixed

Full changelog: https://github.com/spliffspliff70-wq/websense-mcp/compare/v1.1.0