Skip to main content
sentinel
Logsince v0.1.0

Changelog.

All notable changes to @isoldex/sentinel. Latest version: v4.2.1 · npm · Github

v4.2.12026-10-20

First published 4.2.x release: MCP security, safer credentials, reliable browser actions and cancellation. Includes the previously unpublished 4.2.0 changes.

  • breakingRemote MCP HTTP binding requires SENTINEL_MCP_TOKEN. Clients send Authorization: Bearer <token>. Host/Origin allow-lists and a configurable 4 MiB request-body limit protect HTTP access.
  • fixedDiscover labelled iframe fields, selected files and styled rating/radio controls. Keep stable target identity after scrolling or when multiple controls have the same label.
  • fixedVerify actual field values and tab selection. Focus, an opened calendar or intermediate scrolling no longer falsely completes an unrelated instruction.
  • fixedFill readonly date inputs through the calendar cascade and select the day only after matching the displayed month.
  • fixedKeep explicitly named targets in planner context on large forms. Stop after a late planner response when a run was cancelled or its timeout expired.
  • addedfillForm() accepts AgentRunOptions, including timeoutMs and signal. Deterministic Chromium regression tests now run on every PR.
  • changedPublish through GitHub Actions using npm Trusted Publishing (OIDC) and provenance. Node 20, 22 and 24 plus Windows remain covered.
  • changed778 unit tests and 40 browser/component tests pass. The separate live-site suite has known failures; it is not a release gate. Production dependency audit: zero vulnerabilities at release.
v4.2.02026-08-02

Prepared security and reliability changes; not published to npm. All changes below ship in 4.2.1.

  • fixedKeep interpolated variables out of locator/pattern caches, retaining placeholders instead. Tighten cache and session-file permissions where supported.
  • addedrunStream() cancels the background agent when the consumer stops. AgentRunOptions.signal supports external cancellation; AgentResult.aborted identifies it.
  • fixedSerialize MCP browser initialization and tool execution, preventing duplicate browser launches and concurrent actions against one page.
  • fixedWrite separate numbered cost audit files for parallel tasks. Apply jitter and Retry-After handling to transient provider retries. Compile URL patterns once without corrupting literal fragments.
  • changedA custom provider carries its own credentials; a dummy Gemini apiKey is no longer required. Builds clean dist first and omit unusable source maps.
  • fixedCLI version reporting uses the package version. Correct CommonJS transpilation of version loading and invalid coordinate fallbacks.
v4.1.72026-08-02

Repair consumer package imports, optional provider SDK loading, Playwright fixture dependencies and model-specific cost budgets.

  • fixedPublish the complete dist directory so the root package and documented subpaths import successfully. Add a packed-package consumer check to CI and prepublishOnly.
  • fixedLoad Claude/OpenAI optional SDKs through an ESM-compatible resolver. Declare @playwright/test as an optional peer for the test fixture.
  • fixedUse the actual provider model for cost accounting, expose pricingKnown and warn when a cost cap cannot be enforced for an unpriced model. Clear completed timeout timers.
  • addedType-aware ESLint, Prettier, stricter TypeScript and coverage checks. Logging routes through the configurable logger. ClaudeProvider package default changes to claude-sonnet-5.
v4.1.62026-05-19

Internal refactor of the Sentinel entry point and action engine.

  • changedExtract public types, re-exports, action helpers, cache coordination and blocker recovery into focused modules. Public import names remain available.
v4.1.52026-04-25

Bound structured-output token usage, ground extraction in visible page evidence and repair repeated HTTP MCP requests.

  • addedStructured output defaults to 16,000 tokens, with one retry at 32,000 tokens on detected truncation. GenerateOptions.maxOutputTokens controls individual calls.
  • fixedReject ungrounded extraction payloads on empty, redirected or unrelated pages rather than returning invented records.
  • fixedUse a fresh MCP transport per HTTP request while sharing the browser session, fixing HTTP 500 responses after initialization.
v4.1.42026-04-24

HTTP MCP transport, verifier feedback and proactive blocker recovery.

  • addedStreamable HTTP MCP transport with configurable host and port, plus build/watch and HTTP development scripts.
  • fixedFeed verifier rejections into replanning, distinguish submitted searches from typed text, and bypass failed cached strategies on retry.
  • fixedDismiss consent overlays after navigation and recognize additional accept/reject button patterns.
v4.1.32026-04-23

Provider prompt caching, agent time budgets, loop detection and more reliable widget interaction.

  • addedSeparate static system instructions across providers. Add run() time budgets and detect repeated targets or identical extractions.
  • fixedReduce false cookie-banner clicks, select from already-open listboxes, and verify fills/selects alongside clicks.
  • fixedPersist locator caches with debounced atomic writes and drain pending changes when closing.
v4.1.22026-04-19

Correct vision coordinates and replace heuristic pre-scrolling with planner-directed discovery.

  • fixedScale HiDPI screenshot coordinates to CSS pixels and reject incomplete, low-confidence or out-of-bounds vision responses.
  • changedUse explicit notFound feedback for bounded scroll-and-retry discovery instead of keyword-triggered pre-scrolling.
v4.1.12026-04-19

Pattern caching, CAPTCHA detection hooks and widget regression coverage.

  • addedCache successful interaction patterns, detect CAPTCHA widgets and add MUI component/browser regression examples.
  • changedMove detailed guides to the website, add demo GIFs and remove internal tooling files from the published package.
v4.1.02026-04-11

Three killer features: fillForm(json), intercept(), TOTP/MFA. Plus widget detection, click-target verification, and form intelligence.

  • addedsentinel.fillForm(json) — declarative form filling with a single JSON object. Sentinel maps keys to form fields via LLM and fills them automatically.
  • addedsentinel.intercept(urlPattern, trigger) — network interception: capture raw API responses during browser actions instead of scraping DOM.
  • addedTOTP/MFA automation — mfa: { type: 'totp', secret: '...' } auto-generates 2FA codes during login flows. generateTOTP() also exported standalone.
  • addedplannerModel / plannerProvider — use a stronger model for planning (e.g. Gemini 3.1 Pro) while a cheap model (Flash) handles execution.
  • addedmode: 'aom' | 'hybrid' | 'vision' — configurable element detection strategy with vision fallback on coordinate mismatch.
  • addedClick-target verification — verifies the element at click coordinates matches the intended target, with Playwright locator fallback on mismatch.
  • addedWidget pattern detection — 9 patterns for custom dropdowns, datepickers, sliders, and CSS-library components (React Select, Ant Design, MUI, etc.).
  • addedUniversal slider-fill — 3-strategy cascade: native range input, sibling text-input (Amazon-style price filters), or keyboard simulation via aria-valuemin/max.
  • addedValidation error detection — reads form error messages via aria-invalid, role='alert', class*='error' and passes them to the planner.
  • addedForm field/button separation — planner prompt structurally separates form fields from buttons with filled/unfilled status indicators.
  • addedProactive blocker dismissal — cookie banners and modals are dismissed at the start of each step, not just on failure.
  • changedState verification uses compact fingerprint (role+name+region+value+error+state). Catches dropdown openings, focus shifts, and value changes.
  • changedUnicode regex (\p{L}\p{N}) for text normalization — supports all Latin-script languages.
  • changedAction-level retry with exponential backoff for transient failures (timeout, detached, disposed).
v4.0.02026-04-11

Top-3 candidate ranking, pre-action validation, cookie auto-recovery, spatial region tags, contenteditable support.

  • breakingDefault viewport changed from 1280×720 to 1920×1080.
  • breakingLLM action schema uses candidates[] array instead of single elementId.
  • breakingPrompt format changed from JSON to pipe-delimited (id | role | name | region).
  • addedTop-3 candidate ranking — LLM returns up to 3 element candidates per action; next candidate is tried instantly without a new LLM call on failure.
  • addedPre-action validation — validateTarget() checks disabled, hidden, or overlay-blocked elements before clicking.
  • addedCookie/overlay auto-recovery — automatically dismisses cookie banners and closes modals before retrying.
  • addedSpatial region tags — every element gets a region field (header/nav/sidebar/main/footer/modal/popup).
  • addedcontenteditable support — rich-text editors are detected and handled correctly (fill uses Ctrl+A).
  • addedScroll discovery — batch-scrolls to find elements in virtual-scrolling containers.
  • addedVision-augmented planning — planner receives a visual page description on complex pages (>100 elements).
  • addedDOM fallback for off-screen AOM — triggers full DOM parse when all AOM elements are outside the viewport.
v3.9.02026-04-08

OpenTelemetry traces and metrics — every LLM call, act(), extract(), and agent step is instrumented.

  • addedOpenTelemetry support — 6 span types (sentinel.agent → sentinel.agent.step → sentinel.act → sentinel.llm, plus sentinel.extract, sentinel.observe) and 6 metrics (act.requests, act.duration_ms, llm.requests, llm.tokens, llm.duration_ms, agent.steps). Zero overhead when no OTel SDK is configured.
  • fixedActionResult.selector was discarded by the outer Sentinel.act() wrapper — now correctly forwarded from ActionEngine.
v3.8.02026-04-08

Stable CSS selector export after every run() — paste directly into Playwright tests.

  • addedAgentResult.selectors — camelCase slug of each instruction maps to the most stable CSS selector found. Priority: data-testid → #id → [name] → [placeholder] → [aria-label] → role:has-text.
  • addedActionResult.selector — single act() calls now also expose the selector for the acted-on element.
  • addedslugifyInstruction() exported from @isoldex/sentinel — converts a natural-language instruction to a camelCase key.
v3.7.02026-04-08

Prompt caching — identical (prompt, schema) pairs return instantly at zero token cost.

  • addedpromptCache option (false | true | string) — in-memory LRU (200 entries) or file-persisted cache keyed by djb2 hash of prompt + schema. Covers act(), extract(), observe(), and the agent loop.
  • addedsentinel.clearPromptCache() — flush the prompt cache programmatically.
  • addedIPromptCache interface exported for custom backends (Redis, SQLite, etc.).
  • fixedSentinel.parallel() factory errors are now isolated per task — a browser launch failure no longer aborts remaining tasks.
  • fixedextend() CDP session leak — calling extend() on the same page multiple times now detaches the previous session first.
v3.6.02026-04-08

Sentinel.parallel() — concurrent browser sessions with a worker pool, error isolation, and progress callbacks.

  • addedSentinel.parallel(tasks, options) — runs N independent agent tasks in parallel, each in its own browser session. concurrency option limits simultaneous sessions (default: 3).
  • addedonProgress callback — fires after each task with (completed, total, result).
  • addedParallelTask, ParallelResult, ParallelOptions types exported.
v3.5.02026-04-07

sentinel.extend(page) — add AI capabilities to any existing Playwright Page object.

  • addedsentinel.extend(page) — attaches act(), extract(), and observe() directly to any Playwright Page. Drop-in for existing Playwright projects.
  • addedverbose: 3 — new debug level exposing chunk-processing stats and full LLM decision JSON per act() call.
  • changedverbose: 1 now logs action summaries only. Reasoning moved to verbose: 2. Minor breaking change for consumers relying on reasoning at level 1.
v3.4.02026-04-07

Chunk-processing, Shadow DOM, and iframe support.

  • addedfilterRelevantElements() — keyword-overlap scoring reduces elements sent to LLM on pages with 200+ interactive elements. maxElements option (default: 50).
  • addedFull Shadow DOM support — parseDOMSnapshot() and parseFormElements() recursively pierce all shadow roots via queryShadowAll(). Covers Salesforce, ServiceNow, Lit, Polymer, Stencil.
  • addediframe support — parseFrameElements() collects interactive elements from same-origin frames with coordinate offsets.
v3.3.02026-04-07

Intelligent error messages with structured diagnostic output and actionable tips.

  • addedActionResult.attempts — structured array of every tried path (coordinate-click, vision-grounding, locator-fallback) with specific errors.
  • addedContextual tip in result.message — outside viewport → scroll suggestion, timeout → overlay hint, all paths exhausted → rephrase or enable visionFallback.
v3.2.02026-04-07

Self-healing locators — cache successful element lookups, skip the LLM on repeated calls.

  • addedlocatorCache option (false | true | string) — in-memory or file-persisted cache. On repeated act() calls with the same URL + instruction, Playwright uses the cached selector directly.
  • addedAutomatic cache invalidation — if the cached element is gone, the entry is removed and the LLM path takes over.
  • addedILocatorCache interface exported for custom backends (Redis, etc.).
v3.1.12026-04-07

Six bug fixes: stale DOM on retries, tab index corruption, elementCounter race, wrong Gemini model, token callback leak, MCP crash on browser failure.

  • fixedstateParser.invalidateCache() now called at the start of every retry attempt — not just once before the loop.
  • fixedcloseTab() now correctly decrements activePageIndex when a lower-index tab is closed.
  • fixedelementCounter race condition in StateParser — now a local variable threaded through parallel parse() calls.
  • fixedGeminiProvider.generateText() with systemInstruction now uses the constructor model, not process.env.GEMINI_VERSION.
  • fixedonTokenUsage callback nulled out on close() to prevent TokenTracker from being held in memory.
  • fixedAll 7 MCP tool handlers now wrapped in try-catch — browser failures return isError: true instead of crashing the server.
v3.1.02026-04-07

CLI tool, MCP server, and Playwright Test integration — all in one release.

  • addedCLI — sentinel binary with 4 subcommands: run, act, extract, screenshot. Accepts --api-key, --headless, --model, --output, --url.
  • addedMCP server — 8 tools exposed via stdio transport: sentinel_goto, _act, _extract, _observe, _run, _screenshot, _close, _token_usage.
  • addedPlaywright Test fixture — @isoldex/sentinel/test exports test with ai fixture. sentinelOptions configurable globally in playwright.config.ts.
v3.0.02026-04-07

extract step type in AgentLoop, append action, token tracking, withRetry utility.

  • breakingAgentLoop constructor now requires extractionEngine as second parameter. Only affects consumers constructing AgentLoop directly — sentinel.run() is unaffected.
  • addedAgentResult.data — the planner can now issue extract steps mid-run. Structured data is returned in the final AgentResult.
  • addedappend action type — appends text to an input without clearing existing content.
  • addedToken usage tracking via onTokenUsage callback — all four providers fire it after every LLM call.
  • addedwithRetry() utility — unified exponential backoff extracted from all four providers.
  • fixeddomSettleTimeoutMs not forwarded to ActionEngine — now passed to all three waitForPageSettle call sites.
v2.3.32026-04-06

userDataDir — persistent browser profiles including IndexedDB (WhatsApp Web, PWAs).

  • addeduserDataDir option — persists the full Chromium profile including IndexedDB and ServiceWorkers. Required for apps that use IndexedDB for auth (WhatsApp Web, etc.).
v2.3.12026-04-06

Native vision support for all LLM providers via analyzeImage().

  • addedanalyzeImage() method added to all four providers (Gemini, OpenAI, Claude, Ollama). visionFallback: true now works with any vision-capable provider.
  • changedDefault Gemini model updated to gemini-3-flash-preview.
v2.3.02026-04-06

Contextual button naming, off-screen enrichment, withTimeout on all actions, 4-strategy locator chain.

  • addedContextual button naming — StateParser walks AOM ancestors to enrich generic labels like 'Select plan' with card context ('Kelag | Fixtarif | 17,40 cent/kWh: Select plan').
  • addedwithTimeout wrapper on all actions — 10-second timeout prevents indefinite hangs.
  • addedViewport bounds check before click + scrollIntoViewIfNeeded fallback.
  • addedRadio/checkbox JS click fallback — handles inputs hidden via CSS by traversing to the closest label.
  • added4-strategy locator chain: exact role+name → inexact role+name → CSS :has-text → plain text.
  • changedMutationObserver DOM settle replaces networkidle — resolves after 300ms of DOM silence (cap: 3s).
v2.0.02026-04-05

Major release — Sentinel becomes a full AI agent framework.

  • addedAutonomous Agent Loop — sentinel.run(goal) with Plan → Execute → Verify → Reflect cycle.
  • addedVision Grounding — Gemini Vision fallback in act() via visionFallback option.
  • addedMulti-LLM Provider System — GeminiProvider, OpenAIProvider, ClaudeProvider, OllamaProvider.
  • addedMulti-Tab and Multi-Browser support (Chromium, Firefox, WebKit).
  • addedSession Persistence — saveSession(), sessionPath option.
  • addedRecord and Replay — startRecording(), stopRecording(), exportWorkflowAsCode(), replay().
  • addedProxy and Stealth Mode — proxy option, humanLike delays, User-Agent rotation.
  • addedEvent System — Sentinel extends EventEmitter, emits action, navigate, close.
  • addedToken Tracking — getTokenUsage(), exportLogs().
  • addedStructured Error Classes — SentinelError, ActionError, ExtractionError, NavigationError, AgentError, NotInitializedError.
v1.0.02025-01-01

Initial release — AOM-based browser automation with natural language actions.

  • addedPlaywright-based browser automation (Chromium). AOM via CDP.
  • addedsentinel.act(instruction) — click, fill, hover.
  • addedsentinel.extract(instruction, schema) — Zod-typed structured extraction.
  • addedsentinel.observe() — page observation via AOM.
  • addedSemantic verification loop with automatic retry.
  • addedGemini Flash / Pro integration, verbose logging levels.