Skip to content

Latest commit

 

History

History
69 lines (35 loc) · 15.5 KB

browser-assistant.md

File metadata and controls

69 lines (35 loc) · 15.5 KB

Browser assistant

English · 简体中文 · 繁體中文 · 日本語 · Français · 한국어 · Español · Русский

Open the account menu → Browser assistant, or /#/browser-assistant. Capture selected web content or the entire loaded page with images, and use your Doca AI assistant in the extension sidebar.

Install and sign in

Create a capture profile in Doca: create new documents under a chosen destination, or append to an existing rich-text / Markdown document. Configure the default profile, title rule ({title}, {date}) and AI instructions. Generated knowledge-book pages cannot be direct append targets.

Download and extract the configured extension using the button above the settings tabs. Enable developer mode in Chrome / Edge and load the extracted folder. Manifest V3 requires Chromium 116 or newer. A self-hosted ZIP is not click-to-install distribution; store publication and enterprise signing are not provided. Reload pages opened before installation to show the right-side toolbar; capture from the extension also loads its scripts on demand.

The archive contains a Doca address only, with no account credential or activation deadline. Opening the extension uses this browser's existing Doca sign-in. If signed out, a normal Doca login page opens; sign in and return to the extension. Closing a Doca tab does not sign out. Website logout, expiration or session revocation invalidates the associated browser access. Switching accounts reloads that account's profiles and isolates unfinished material and AI state by connection.

The extension never reads or copies website cookies. A same-origin Doca page provides a 60-second single-use authorization code, proved with a SHA-256 challenge and random verifier. The exchanged restricted token lasts 10 minutes, remains in trusted extension session storage, and is reauthorized automatically. The server stores hashes and checks the original website session on every operation. When cookie restrictions prevent extension-side probing, the same-origin page verifies sign-in; passive polling can reuse a proof for up to 30 seconds, while user capture and AI operations recheck it.

Capture, AI and server address

For Create a new document, select Personal documents, a library root, or a specific document in the destination tree. The picker follows the document Move dialog. Libraries paginate separately from recent documents; use Load more libraries to continue. Reopening a saved profile expands and locates its destination. Read-only documents remain visible as disabled ancestors. Load failures can be retried without changing the selection; unavailable destinations block saving. The existing library outline limit is 10,000 nodes, with a warning when truncated. Knowledge-book generated content remains read-only. Append targets continue to use document search.

Normal webpages show five persistent right-side icons: Capture this page, Capture selection, Doca assistant, Open Doca website and Settings. Open Doca website opens the currently configured site in a new tab, including when signed out; missing or invalid site configuration opens the extension settings. Drag the top handle vertically to move the toolbar away from webpage controls. Its local position survives reloads, new webpages and browser restarts; arrow keys, Home and End also work when the handle is focused. The bottom arrow below Settings collapses or expands the toolbar; the collapsed handle can still be dragged. The toolbar reads its position cache before becoming visible. Selecting text does not show another icon or toolbar.

Click a capture icon to review its rule and destination in the confirmation bubble’s custom dropdown, then confirm. Select text first for selection capture. Whole-page capture includes loaded top-level DOM beyond the viewport. The default rule is preselected and other rules remain available. Each opening rechecks sign-in and current profiles. Temporary failures can be retried; missing profiles link to settings. Retry from the bubble or the extension popup reuses the original material and request ID without duplicating committed content. Unsent material is kept in the current browser session and may need to be selected again after closing the entire browser. After updating or reloading the extension, old page scripts ask you to reload that page.

The Doca assistant icon opens the browser's right side panel with the same Doca chat UI, model selector, Markdown, progress and approvals. Opening the panel does not call a model. Sending a new message reads the latest active page; tab switches, navigation and in-page routes update the reference. Retrying one message keeps its original material. Unsupported or unavailable images do not prevent AI from reading the staged text; unavailable images also keep source placeholders when archiving. Welcome prompts cover saving, summarizing, extracting key points and organizing web material. There is no attach-page checkbox. AI uses Doca's models, metering and approval flow. Continue the conversation in Doca. Connections initially allow AI; edit a connection in Doca to change its name or AI switch. Account and model policies still apply.

The first accepted message names a new conversation from its page name, request, and hostname, with a browser icon identifying its origin. Newly attached pages appear in operated resources on both surfaces, opening in a new tab with one entry per URL. These links grant no document access. After a rule edit, reopening the assistant starts a composer for the current selected rule when the remembered conversation belongs to an older revision. The original conversation and pending messages remain; old tasks are not silently rebound to a new rule. Existing titles and conversations are not backfilled or rewritten.

The current extension version is 0.2.11. Opening the extension checks the package version provided by the configured Doca site. Connection refreshes repeat the check at intervals of at least five minutes while open; Settings also offers a manual check. A newer package shows a notice in the popup and AI sidebar, linking to that site's download page. Doca displays the version and full filename, doca-browser-assistant-<version>.zip, sourced from the extension's manifest.json independently of the server version. After updating Doca, download and reload the extension in Chrome / Edge; a server update does not replace an installed extension. Ordinary capture requires no AI model. The AI sidebar requires a model configured and allowed by the site.

Version checks only report newer site packages. They do not infer protocol compatibility or restrict operations. A missing endpoint, invalid response or network error displays a failed check rather than claiming compatibility or the latest version. Configuration, authorization and pending data formats are unchanged; no historical data is migrated or removed. Existing extensions need one manual update before they can show these notices.

If a normal HTTP(S) page has no capture receiver after navigation or was opened before installation, capture loads the bundled scripts into its top frame and retries once without reloading the page. The extension declares scripting alongside its existing HTTP(S) site access for this recovery. Browser-restricted pages and denied site access still fail explicitly.

New AI sends are saved transactionally in IndexedDB before the input is consumed, scoped to the Doca site, account, connection and selected profile. Sending, failed and accepted messages appear once in the conversation. Only messages still waiting to send appear in the pending list; they do not remain there until the AI replies. Refreshing can continue the original message ID; a job already accepted by the server is reconciled before any new page capture or submission. Previous localStorage pending messages remain unchanged and require an explicit Continue or Withdraw with the current model and scope selected.

Use the right-side Settings icon to open a standalone settings page, manage capture rules in Doca or edit Doca server address, for example https://doca.example.com, without /api/v1, other paths or query parameters. The extension popup also retains its settings entry. Alternatively copy the public site configuration in Doca and paste it in the extension's expandable configuration section. Production requires HTTPS; loopback HTTP is allowed for development. The strict format is { "version": 2, "origin": "https://doca.example.com" }. Switching sites verifies the account signed in there and never forwards the previous site's pending material.

Revoke and restore

Revoke one or all browser connections in Doca. Access keys and outstanding codes stop working and associated browser AI jobs are cancelled. Being signed into the website does not restore a revoked connection. Explicitly choose Restore connection in Doca, then reconnect the extension. Automatic authorization reuses the installation binding and cannot create another connection to bypass revocation.

Saved documents, original images and conversations remain. Revocation and logout cannot undo committed transactions. Website-origin AI jobs in the same conversation remain independent. Browser tool/commit boundaries validate the current website session; this host cancels affected jobs after logout, while other executors recheck authorization at heartbeat and operation boundaries.

Limits and upgrade

Before upgrading or rolling back, stop queue sending and close all older Doca pages and extensions. Do not run old and new senders together. Preserve localStorage, IndexedDB, retained tombstones and all later data. Rollback keeps queue sending disabled: it does not export the new store into localStorage or re-enable an older sender. An old version without a safe sender-disable facility cannot resume queue sending. See the approved preservation and rollback contract.

Capture preserves semantic text, headings, lists, code, links, ordinary tables, source attribution and images. It does not reproduce arbitrary CSS/interaction, unloaded data, pagination, iframes, closed shadow roots, virtual lists, canvas or video. Static SVG images and inline SVG are sanitized and rasterized locally to transparent PNG; scripts and event handlers are removed. SVG requiring external resources, embedded HTML, animation or unsupported rendering is marked with a placeholder instead.

New static PNG, JPEG and WebP images exceeding 4 MiB or 25 million pixels are compressed before upload to at most 4 MiB, a 4096-pixel longest edge and 16 million pixels. Source encoding, PNG/WebP alpha and EXIF display orientation are preserved. Smaller images keep their original bytes. GIF, animated WebP and APNG are never flattened; animations over the existing 20 MiB or 25-million-pixel limit are replaced with a labelled placeholder. Stored images and images already uploaded during a retry are not reprocessed. Source reads are bounded to 64 MiB and static decoding to 100 million pixels. SVG source transfer is limited to 32 MiB to bound extension messages. SVG output is bounded to 4096 pixels on its longest edge and 16 million pixels, then follows PNG compression limits.

Server limits remain 20 MiB / 25 million pixels per image, 100 images / 100 MiB total; Markdown is limited to 512 KiB. New captures process images before creating a task. Unsupported, unreadable or unconvertible images become readable placeholders at their original positions, with a reason and the original HTTP(S) source link; the other images and text continue saving. Blob/data URLs are not persisted as placeholder links. Authorization, quota and storage errors still stop saving. Once staged, the exact manifest and request ID remain frozen for retries, and image-processing failures discovered during upload become placeholders at commit. Network, authorization, quota and storage-write errors still stop submission. Pending tasks expire after 24 hours; cleanup removes unbound objects only.

Extension 0.2.6 uses the existing v1 capture protocol and raster asset format without a database change. The owner approved leaving saved documents, uploaded images and historical failed tasks unchanged: update/reload the extension and source page, then start a new capture for an old failure. Old tasks are not automatically converted or resubmitted and retain their normal expiry. Rollback needs no data conversion; keep existing documents and tasks. No staged payload or historical document is rewritten automatically.

AI tools provide bounded reads/search, capture and rich-text / Markdown edits inside the profile's resource scope and current user permissions. Arbitrary networking, scripts, plugin tools and unrestricted browser automation are unavailable.

Before first release, the owner approved replacing the previous activation-package / 180-day token design. Old v1 configuration, activation endpoints and tokens are rejected without conversion. Existing profiles, content, images, conversations and credential records remain. Update server, Web and extension together, use the public site configuration and sign in again. There is no old-authentication fallback or mixed-version contract.

Extension files live in apps/browser-extension. pnpm build:browser-extension bundles the shared AI UI into local generated/ assets and runs as part of build, dev and dev:workspace. The server packages these local assets, the fixed extension files and the public site configuration without loading remote scripts. Source and Docker deployments must include the built assets. Current DDL adds two empty website-session/code tables alongside the retained five initial tables, without changing the compatibility generation or backfilling old credentials. See the database upgrade contract and login acceptance record.

Extension 0.2.6 saves linked images and SVG separately from their target links, avoiding nested Markdown that prevents the whole page from converting. The live Nature page was captured, opened and reloaded; see Nature capture acceptance.

Extension 0.2.10 and Doca 0.2.22 also retain unsupported embedded-media placeholders, accept recoverable conversion warnings, and keep literal source text if parsing fails. Current request diagnostics appear beside the saved-document link; no report is stored in the database or frozen task. Completed retries remain idempotent and do not replay a historical report. See Annual Reviews capture acceptance.

Full-page capture omits CSS-hidden duplicate content. If native formatting exceeds the existing new-document import budget, the server retains the complete source in bounded plain-text blocks together with the title and uploaded images, and reports the formatting degradation. Source-content, authorization, quota and storage limits still apply. See the 0.2.21 release notes.

Each new capture automatically reclaims the oldest slots after 30 minutes without upload/retry activity when the ten-task limit is full. Active browser AI connections are protected; source and images remain until their original 24-hour deadline. An expired capture is rebuilt once from the same frozen material by extension 0.2.10. No manual cleanup is needed. See the 0.2.22 policy and rollback requirements.