Commit graph

73 commits

Author SHA1 Message Date
Alessandro
e412f5faf7 Fix browser canvas startup viewport settle
Wait for the right-canvas browser surface to finish its opening transition before using its dimensions as the Playwright viewport.

Measure raw stage dimensions for stability, then apply the existing clamped viewport values so initial screencasts do not render into a stretched canvas.

Add a browser regression guard for the raw viewport settle path.
2026-04-27 17:35:50 +02:00
Alessandro
8a6d47b23f Tighten Office document auto-handoff
Require explicit artifact, file, canvas, or format cues before turning response text into an Office artifact, while still allowing standalone deliverable-shaped drafts to open in the canvas. Add a same-turn guard so the response affordance does not duplicate documents already created with document_artifact, plus regression coverage for noisy long-document cases.
2026-04-27 03:08:22 +02:00
Alessandro
c5ea678052 Add Time Travel workspace history
Add the _time_travel core plugin with Agent Zero-owned shadow Git snapshots, history/diff/preview/travel/revert APIs, capture hooks, and canvas plus floating window UI surfaces for /a0/usr workspaces.

Wire generic file-browser mutation hooks for UI edits, update modal backdrop handling, remove the legacy _diff_viewer plugin, and replace Diff Viewer tests with focused Time Travel coverage.

Inspired by Space Agent :-)
2026-04-27 01:27:20 +02:00
Alessandro
4ff3244ce6 Add browser annotate mode
Add Codex-inspired annotation UI to the built-in Browser surfaces, including the Annotate toggle, Cmd/Ctrl+. shortcut, selection overlay, inline comments, and batch Draft to chat / Send now actions.

Wire browser_viewer_annotation through the WebSocket and runtime layers, and expose safe DOM metadata extraction for clicked elements and selected areas without leaking password/value data.

Expand regression coverage for the Browser UI, annotation dispatch, runtime helper exposure, prompt formatting, and WebUI extension surface harness behavior.
2026-04-26 23:57:48 +02:00
Alessandro
58a5f8276b Add right canvas diff viewer
Adds the core _diff_viewer plugin for viewing staged, unstaged, and untracked working-tree changes in the right canvas and window modal.

Includes context-aware workspace resolution, safe read-only Git collection, zero-line .gitkeep filtering, unified diff rendering, and focused diff collection tests.
2026-04-26 23:52:24 +02:00
Alessandro
bf02987d57 Add Office Collabora canvas integration 2026-04-26 12:57:26 +02:00
Alessandro
c9f1bd21ca Add universal right canvas shell 2026-04-26 12:56:51 +02:00
Alessandro
dccf017d2c Redesign Browser viewer screencast transport and viewport fit
Replace the Browser viewer’s screenshot polling with CDP screencast streaming for much smoother navigation. The runtime now starts/stops CDP screencasts cleanly, acknowledges frames, drops stale frames, and keeps the WebSocket payload compatible with the existing viewer.

Also fixes modal viewport sizing by sending the initial stage dimensions on subscribe, applying CDP emulation sizing before the first frame, avoiding image stretching, and increasing screencast JPEG quality to 92. Regression coverage was added for the screencast path, frame ack/drop behavior, viewport sizing, and UI rendering assumptions.

-- Still needs thorough performance audit and optimization --
2026-04-26 02:28:59 +02:00
Alessandro
cf67047ad3 Polish Browser chrome and extension management UX
Refine the Browser modal UI with more native-feeling tabs, consistent chrome controls, right-side tab close buttons, and a cleaner extension dropdown. Move the Browser LLM preset into the dropdown with the active Main Model summary, simplify extension settings, remove the global extension enable switch and legacy extension root behavior, and add per-extension enable toggles.

Also updates the Chrome extension install/review flow with contextual warning copy, “Scan with A0”, cleaner labels, hidden empty extension state, and regression coverage for the new Browser UX.
2026-04-26 00:09:16 +02:00
Alessandro
fa7eef1919 Use persistent full Chromium runtime for Browser
- Always launch Browser with full Playwright Chromium instead of switching between headless shell and extension mode
- Cache Chromium under /a0/usr/plugins/_browser/playwright with legacy lookup for existing installs
- Store installed Browser extensions under /a0/usr/plugins/_browser/extensions with legacy extension-root compatibility
- Show clearer first-run Chromium install messaging and extend the initial Browser timeout
- Fix Browser spinner animation for startup and extension install states
- Update Docker Playwright install script and regression coverage
2026-04-24 19:08:01 +02:00
Alessandro
fb98c2f89a Fix Chrome extension install and Browser startup with extensions
- Download Chrome Web Store extensions using the detected Chrome prodversion instead of a stale hardcoded version
- Update extension settings copy to reflect Chrome Web Store URL support
- Serialize Browser persistent-context startup and clean stale Chromium profile singleton locks
- Increase Browser viewer subscribe timeout for extension-enabled cold starts
- Add regressions for Web Store download URL handling, slow viewer startup, and stale profile lock cleanup
2026-04-24 18:12:18 +02:00
Alessandro
983d431a5e browser: replace browser-use agent with native browser
Introduce the new built-in Browser plugin for Agent Zero, replacing the legacy
browser-use-based browser agent with a direct Playwright-powered browser tool,
live WebUI viewer, browser session controls, status APIs, configuration, and
extension-management support.

Add browser-specific modal behavior so the browser can run as a floating,
resizable, no-backdrop window, including modal focus, toggle, and idempotent
open helpers for richer WebUI surfaces.

Remove the old `_browser_agent` core plugin and the `browser-use` dependency,
then clean up stale browser-model wiring and references across agent code,
model configuration docs, setup guides, troubleshooting docs, skills, and
Agent Zero knowledge.

Update regression and WebUI extension-surface coverage for the new browser
architecture and modal behavior.

The legacy browser-use implementation has been extracted from core so it can
continue separately as a community plugin published through the A0 Plugin Index for any user or professional that were relying on it for workflow.
2026-04-24 15:43:52 +02:00
Alessandro
fe2310aa90 Add project-scoped LLM presets
Add LLM preset selection to project create/edit flows, backed by _model_config scoped project config. Support global, project, and combined preset APIs with explicit metadata while preserving plain YAML preset files. Copy selected preset chat/utility settings into project-scoped config, keep embedding settings from the effective config, and document/test the new project model config paths.
2026-04-21 18:18:59 +02:00
Alessandro
4c2bc3d783 Add context-based patch_text support to text_editor
Introduces patch_text editing for the Docker-local text_editor, sharing request validation and freshness-state logic with text_editor_remote while preserving legacy line-number edits. Adds anchored context patching, safer state handling after context edits, updated model guidance, live remote wrapper reuse, and focused regression coverage for chained patches and Python replacement cases.
2026-04-21 18:18:59 +02:00
Alessandro
79f948b076 Improve active skills management and simplify Skills UI
Unify skill handling layer and raise the active skills cap to 20.

The Skills UI now presents a simpler checklist-style flow for selecting active
skills, with live chat activation and saved defaults using the same visible list.
Skill contents can be opened in a read-only Ace viewer via the existing markdown
modal.
2026-04-21 05:47:22 +02:00
Alessandro
b73da881c6 Upgrade FastMCP to 3.2.4 / MCP to 1.27.0 for CVE-2026-32871
Bump FastMCP from 2.13.1 to 3.2.4 and MCP from 1.22.0 to 1.27.0
to remediate CVE-2026-32871 (GHSA-vv7q-7jx5-f767), as flagged by
Docker Scout.

Add a regression test covering OpenAPI path-parameter escaping so
malicious values like ../../../admin/delete-all? remain percent-encoded
under the intended route prefix instead of resolving to a different
backend path.

Validation:
- smoke-tested Agent Zero MCP initialization against fastmcp 3.2.4 + mcp 1.27.0
- PYTHONPATH=/tmp/agent-zero-testdeps python3 -m pytest tests/test_fastmcp_openapi_security.py -q

Refs:
- CVE-2026-32871
- Docker Scout: https://scout.docker.com/vulnerabilities/id/CVE-2026-32871
- GitHub advisory: https://github.com/PrefectHQ/fastmcp/security/advisories/GHSA-vv7q-7jx5-f767
- Related upstream issue: https://github.com/agent0ai/agent-zero/issues/1526
2026-04-16 15:21:01 +02:00
Alessandro
5a2223596a stop tool dispatch at first completed json object
Tool execution no longer waits for the full streamed assistant text. We now detect the first explicitly closed top-level JSON object, freeze that snapshot as the canonical tool request, and stop the model stream there for dispatch.

To make that safe, DirtyJson completion semantics are tightened so completed=true only means the root object was explicitly closed, not that parsing hit end of file. I also restricted the new extraction path to object roots only, since tool calls are always brace-delimited objects, and added tests for parser completion and early stream stop.
2026-04-03 16:56:21 +02:00
Jan Tomášek
756654b2ba
Merge pull request #1389 from 3clyp50/a0_small
Some checks are pending
Build And Publish Docker Images / plan (push) Waiting to run
Build And Publish Docker Images / build (push) Blocked by required conditions
prompts: adopt compact defaults and rebalance guidance
2026-04-02 16:21:29 +02:00
frdel
0bbc657dd3 fix: apply btn-field class to disabled update buttons in self-update modal
Some checks are pending
Build And Publish Docker Images / plan (push) Waiting to run
Build And Publish Docker Images / build (push) Blocked by required conditions
2026-03-31 15:29:51 +02:00
frdel
b94d4b79ae refactor: comprehensive UI server restructuring and self-update enhancements
- Extract UI server setup into UiServerRuntime class with modular initialization
- Move environment configuration, route registration, and transport handlers to helpers/ui_server.py
- Add released_at timestamp tracking for git tags and branch heads across update system
- Implement get_current_major_main_latest_info to find latest same-major version on main branch
- Add major_upgrade_versions and main_branch_latest fields to update info payload
- Remove
2026-03-31 15:20:57 +02:00
frdel
80518f22a6 Squashed commit of the following:
commit 5193ef7501
Author: frdel <38891707+frdel@users.noreply.github.com>
Date:   Tue Mar 31 09:47:02 2026 +0200

    refactor: change default mode from dedicated to self-chat and reorder UI settings

    - Change default mode to self-chat across all modules
    - Update README to reflect self-chat as primary mode with security warning
    - Move session/media storage from usr/whatsapp to tmp/whatsapp
    - Reorder config UI: move Mode above Allowed Numbers
    - Add warning banner when allowed_numbers is empty in self-chat mode
    - Move Bridge Port and Poll Interval to bottom of settings
    - Update mode descriptions to clarify self-chat handles both self

commit 9fece911b5
Author: frdel <38891707+frdel@users.noreply.github.com>
Date:   Tue Mar 31 09:20:35 2026 +0200

    refactor: centralize WhatsApp storage paths and improve bridge dependency handling

    - Add storage_paths.py helper for consistent session/media/runtime paths
    - Replace hardcoded usr/whatsapp paths across all modules
    - Fix bridge lock to be event-loop-aware (recreate per loop)
    - Add automatic dependency reinstall on startup failures
    - Track bridge startup output for better error diagnostics
    - Add dependency state tracking with package.json hash validation
    - Implement force reinstall when node_modules appears

commit bc511d221d
Author: linuztx <linuztx@gmail.com>
Date:   Tue Mar 31 09:07:46 2026 +0800

    fix: stop poll loop immediately when Node.js is not installed

commit a9554e132f
Author: linuztx <linuztx@gmail.com>
Date:   Tue Mar 31 08:49:15 2026 +0800

    fix: auto-reinstall corrupt node_modules and stop poll loop after repeated bridge failures

    _ensure_npm_install now verifies key package exists, not just
    node_modules dir. Wipes and reinstalls if corrupt.

    Poll loop stops after 5 consecutive bridge start failures instead
    of spamming errors and making A0 unusable.

commit 61fa1bf487
Author: linuztx <linuztx@gmail.com>
Date:   Tue Mar 31 08:38:51 2026 +0800

    fix: move allowed_numbers filtering from JS bridge to Python handler

    The JS bridge used LIDs (internal WhatsApp identifiers) for sender
    matching which never matched actual phone numbers. Moved filtering
    to Python handler.py where config is read fresh each poll cycle.

    - Add senderNumber (resolved phone) to bridge message payload
    - Filter in poll_messages() with normalized number comparison
    - Remove --allowed-numbers CLI arg and JS-side filtering
    - Fix ensure_bridge_http_up not recording _bridge_config
    - Fix falsy empty-dict check in bridge restart detection

commit 64ee177897
Author: linuztx <linuztx@gmail.com>
Date:   Sat Mar 28 23:34:23 2026 +0800

    refactor: move email agent instructions to system prompt and update prompt labels

commit 0f53b41d80
Author: linuztx <linuztx@gmail.com>
Date:   Sat Mar 28 10:59:44 2026 +0800

    Add node_modules to gitignore

commit eb6a4d3ad2
Author: linuztx <linuztx@gmail.com>
Date:   Sat Mar 28 10:53:59 2026 +0800

    Add WhatsApp plugin thumbnail

commit 39bed4f538
Author: linuztx <linuztx@gmail.com>
Date:   Sat Mar 28 10:51:47 2026 +0800

    refactor: rename allowed_users to allowed_numbers across plugin

commit e4991b6e6e
Author: linuztx <linuztx@gmail.com>
Date:   Fri Mar 27 21:58:29 2026 +0800

    improve: move agent instructions from per-message to system prompt

commit 4f1be15fa7
Author: linuztx <linuztx@gmail.com>
Date:   Fri Mar 27 21:00:25 2026 +0800

    improve: add macOS port kill support and bridge process destructor cleanup

commit f5349753d7
Author: linuztx <linuztx@gmail.com>
Date:   Fri Mar 27 17:09:56 2026 +0800

    improve: remove redundant bridge_manager from execute, rely on poll loop finally

commit 9d9dd4bd7f
Author: linuztx <linuztx@gmail.com>
Date:   Fri Mar 27 14:41:14 2026 +0800

    fix: stop bridge and poll loop when plugin is disabled or toggled off

commit 66b0a7d3e0
Author: linuztx <linuztx@gmail.com>
Date:   Fri Mar 27 11:05:58 2026 +0800

    improve: fix allowed users input, auto-strip + prefix, log ignored messages

commit 938e7b9312
Author: linuztx <linuztx@gmail.com>
Date:   Thu Mar 26 23:26:42 2026 +0800

    improve: add line break to allowed users description

commit 4ef64b9121
Author: linuztx <linuztx@gmail.com>
Date:   Thu Mar 26 22:44:55 2026 +0800

    feat: convert markdown to WhatsApp formatting before sending replies

commit f549b49f44
Author: linuztx <linuztx@gmail.com>
Date:   Thu Mar 26 22:34:56 2026 +0800

    improve: add progress update instructions to system context prompt

commit 66e5d51dcf
Author: linuztx <linuztx@gmail.com>
Date:   Thu Mar 26 22:23:32 2026 +0800

    fix: stop typing indicator on agent error or generation failure

commit 3dd01cd04c
Author: linuztx <linuztx@gmail.com>
Date:   Thu Mar 26 18:31:38 2026 +0800

    improve: persistent typing indicator with poll-based refresh

commit 8d0ec86f15
Author: linuztx <linuztx@gmail.com>
Date:   Thu Mar 26 17:11:25 2026 +0800

    Update README.md

commit e664673c1c
Author: linuztx <linuztx@gmail.com>
Date:   Thu Mar 26 16:05:44 2026 +0800

    feat: add agent prefix to self-chat replies for visual distinction

commit 18c5716d10
Author: linuztx <linuztx@gmail.com>
Date:   Thu Mar 26 15:43:01 2026 +0800

    fix: clear typing indicator after sending reply in self-chat mode

commit 7c653c9d56
Author: linuztx <linuztx@gmail.com>
Date:   Thu Mar 26 14:43:06 2026 +0800

    improve: merge WhatsApp Link and Disconnect into single Account field

commit 57c95e6f13
Author: linuztx <linuztx@gmail.com>
Date:   Thu Mar 26 14:11:05 2026 +0800

    feat: add disconnect account option to switch WhatsApp accounts

commit c62695356e
Author: linuztx <linuztx@gmail.com>
Date:   Thu Mar 26 14:00:00 2026 +0800

    improve: move mode description inline and reorder Allow Group after Allowed Users

commit 18a56ea446
Author: linuztx <linuztx@gmail.com>
Date:   Thu Mar 26 13:44:17 2026 +0800

    fix: remove duplicate typing indicator before sending reply

commit 44c90a118f
Author: linuztx <linuztx@gmail.com>
Date:   Thu Mar 26 13:30:06 2026 +0800

    improve: remove sender number from DM prompt

commit 64fe7d0302
Author: linuztx <linuztx@gmail.com>
Date:   Thu Mar 26 13:17:29 2026 +0800

    fix: handle documentWithCaptionMessage wrapper for captioned documents

commit 00b6657185
Author: linuztx <linuztx@gmail.com>
Date:   Thu Mar 26 13:06:40 2026 +0800

    feat: add attachment reader/writer with RFC and download all media types

commit 8041c085d2
Author: linuztx <linuztx@gmail.com>
Date:   Thu Mar 26 11:45:17 2026 +0800

    improve: update group prompt and reply instructions

commit 71a6eb7557
Author: linuztx <linuztx@gmail.com>
Date:   Thu Mar 26 11:26:36 2026 +0800

    feat: reply to specific messages in group chats with quote

commit 6bf63eb9c6
Author: linuztx <linuztx@gmail.com>
Date:   Thu Mar 26 09:57:34 2026 +0800

    feat: detect replies to bot messages in group chats

commit b4492e0759
Author: linuztx <linuztx@gmail.com>
Date:   Thu Mar 26 09:20:27 2026 +0800

    improve: resolve group names and sender LIDs in bridge messages

commit 14e673f165
Author: linuztx <linuztx@gmail.com>
Date:   Thu Mar 26 04:44:50 2026 +0800

    feat: add allow_group toggle to respond only when mentioned in group chats

commit 40f4884319
Author: linuztx <linuztx@gmail.com>
Date:   Thu Mar 26 03:20:02 2026 +0800

    refactor: rename mode value from bot to dedicated

commit 50af7c2bde
Author: linuztx <linuztx@gmail.com>
Date:   Thu Mar 26 02:34:51 2026 +0800

    fix: kill orphaned bridge process on port before starting new one

commit 45b21c093a
Author: linuztx <linuztx@gmail.com>
Date:   Thu Mar 26 02:07:45 2026 +0800

    improve: auto-restart bridge when config changes

commit a12183ba6e
Author: linuztx <linuztx@gmail.com>
Date:   Thu Mar 26 01:39:55 2026 +0800

    feat: add bot and self-chat mode selection for WhatsApp bridge

commit bb8961ab73
Author: linuztx <linuztx@gmail.com>
Date:   Thu Mar 26 00:56:56 2026 +0800

    improve: send typing indicator immediately on message receive

commit 84c12b0c23
Author: linuztx <linuztx@gmail.com>
Date:   Thu Mar 26 00:29:04 2026 +0800

    feat: add WhatsApp integration plugin with Baileys bridge and QR pairing
2026-03-31 09:47:25 +02:00
Alessandro
54362bf8ee prompts: adopt compact defaults and rebalance guidance
Promote the a0_small prompt work into the shipped default stack.

Token count for default prompt, accounting for tools, plugins, secrets placeholders, inactive project, etc: 2996 tokens.

- migrate compact prompt fragments into core prompts, plugin-owned prompts, and the agent0 overlay
- remove the obsolete a0_small profile and rename the tool-call knowledge reference to a generic framework file
- keep a small set of high-value JSON examples while preserving key guardrails for tool names, tool args, and method-style calls
- bake balanced conciseness into default response behavior without changing the initial greeting
- drop the call_sub prompt-side loader and keep call_sub guidance self-contained
- restore essential secrets/security guidance, preserve inactive-project messaging, and rebalance the A2A prompt
- add a regression test that verifies the assembled default agent0 prompt stays under the token budget and retains critical guardrails
2026-03-30 21:44:20 +02:00
Jan Tomášek
9390ba9624
Merge pull request #1344 from keyboardstaff/ws-rework
refactor: Comprehensive WebSocket System Rework
2026-03-30 16:45:49 +02:00
frdel
44e008745d Sanitize print logs; refactor popular plugin logic
Some checks are pending
Build And Publish Docker Images / plan (push) Waiting to run
Build And Publish Docker Images / build (push) Blocked by required conditions
Ensure printed output and HTML logs are safe by importing and applying sanitize_string, opening log files with utf-8 and errors='replace', and sanitizing text before writing. Add tests to verify lone surrogate characters are replaced and that logging won't crash on invalid Unicode. In the plugin installer UI, introduce POPULAR_PLUGIN_MIN_STARS and centralize popularity checking in _isPopularPlugin, using it for filtering and counts.
2026-03-30 11:50:59 +02:00
Alessandro
1304195d4c ux: onboarding flow prototype
reuse /banners for composer missing-key status

polish onboarding ui; add chat composer API key banner

drop dedicated status backend endpoint
2026-03-27 18:46:09 +01:00
keyboardstaff
b351de456e fix: resolve option whitelist, memory leak, task tracking, and dispatch unification
- Fix Memory Leaks: Resolved SID retention in _known_sids after disconnection and cleaned up unreferenced broadcast tasks in _schedule_lifecycle_broadcast.
- Unify Dispatching Paths: Unified client and server event dispatching through the process_client_event() method to ensure diagnostic consistency.
- Optimization & Cleanup: Expanded the _OPTION_KEYS whitelist, removed dead code (iter_event_types), and deleted unused websocket exports.
- Robustness: Added handling for None responses in process_client_event to prevent cluttering responses with empty results.
- Testing: Added test cases to verify SID TTL expiration and stale SID cleanup on disconnect.
2026-03-27 01:21:45 -07:00
frdel
0bca80a49f Extract installed_target_matches_request helper for update skip check and use describe field for exact version matching
Add installed_target_matches_request helper to check if requested update target matches current installation. Replace short_tag comparison with describe field to ensure exact commit match - prevents skipping updates when current version is ahead of requested tag (e.g. v1.11-12-ge9d9c93d vs v1.11). Return false for "latest" selector tags to force update check. Add test coverage
2026-03-26 13:16:02 +01:00
frdel
e9d9c93d13 Add restart state management and error handling to self-update overlay
Add resetRestartState helper to clear restart status/detail text. Set initial "Preparing update" state in scheduleUpdate before API call. Make restart warning toast non-blocking (catch errors without await). Distinguish restart request errors from connection errors in restartAndReload - only clear overlay for actual HTTP failures, not expected connection drops. Reset restart state and remove overlay on restart request failure or
2026-03-26 13:10:25 +01:00
frdel
8078693e41 Use peeled commit refs (^{commit}) for tag resolution in self-update manager
Replace direct tag refs with peeled commit refs (refs/tags/{tag}^{commit}) in git rev-parse and merge-base operations to ensure resolution to commit objects rather than annotated tag objects. Extract get_tag_commit_ref helper for consistent ref formatting. Update fetch_release_refs to check peeled ref in ancestry validation. Add test coverage for peeled commit resolution in explicit tag selection and fetch operations. Update
2026-03-26 12:54:54 +01:00
frdel
2a47410e17 Add display_version field to repo version info for non-release commits
Add display_version to get_repo_version_info output that shows tag+commits (e.g. "v1.11+9") for development builds. Update self-update UI to prefer display_version over short_tag for current version display. Add describe field to modal when it differs from short_tag. Add test coverage for display_version generation on non-main branches.
2026-03-26 12:47:07 +01:00
frdel
28ff74c1cf Merge branch 'development' of https://github.com/agent0ai/agent-zero into development 2026-03-26 12:33:36 +01:00
frdel
261c4d6138 Add CLI trigger script for self-update with major version validation and backup configuration
- Add trigger_self_update.sh to executable permissions in Dockerfile
- Add trigger-update command mode to self_update_manager.py with argparse CLI
- Add queue_update_request helper to write trigger file with normalized parameters
- Add parse_selector_version, is_valid_selector_tag, is_supported_selector_tag helpers
- Add get_latest_same_major_tag to resolve "latest" within current major version line
- Add ensure
2026-03-26 12:32:37 +01:00
Jan Tomášek
4d435e194f
Merge pull request #1329 from 3clyp50/ui5 2026-03-26 12:25:04 +01:00
frdel
e0dae52b7f Replace file sync with capability detection for durable self-update manager
Replace sync_self_update_runtime_files with durable_self_update_supports_latest that checks whether the durable updater supports the "latest" selector by inspecting manager source code for LATEST_SELECTOR_TAG and resolve_requested_target. Check durable manager first, fall back to repo manager if missing. Block "latest" selection in schedule_update and hide it from get_selector_tag_options when durable updater lacks support.
2026-03-26 12:06:28 +01:00
Alessandro
8333f5b276 ui: plus menu for additional chat actions
Replace the paperclip and the separate bottom action row with a single + control that opens an upward panel next to the chat input box. Menu content stays in bottom-actions.html so chat-input-bottom-actions-start / end extension points are unchanged for plugins using these slots.

Added Files to the left sidebar dropdown for easy nav.

polish plus menu for extra chat actions
2026-03-26 11:55:14 +01:00
frdel
ffa6ac5433 Replace hardcoded SUPPORTED_BRANCHES with dynamic branch discovery from remote repository
- Add _get_remote_branch_names helper to fetch available branches via git ls-remote with caching
- Add _get_local_origin_branch_names fallback for offline scenarios
- Add get_available_branch_values and get_available_branches to expose filtered branch list
- Add _is_excluded_self_update_branch helper to filter out HEAD, PR branches
- Add _sort_branch_names to deduplicate and sort branches with main first
- Add
2026-03-26 11:30:17 +01:00
frdel
c1d709726e Add current branch latest version display to self-update modal with collapsible last attempt section
- Add get_current_branch_latest_info helper to fetch and format latest version info for current branch
- Add _format_branch_head_version helper to format version display (tag only for main, tag+commits for other branches)
- Include current_branch_latest in get_update_info response
- Replace single current version card with two-column grid showing current and latest versions
- Move last attempt status
2026-03-26 11:09:22 +01:00
frdel
192d6e2cae Add latest selector option to self-update with branch head resolution for testing/development and newest tag resolution for main
- Add LATEST_SELECTOR_TAG constant and is_latest_selector_tag helper to identify "latest" selection
- Add split_describe_version helper to parse git describe output into tag and commit count
- Replace fetch_release_refs with resolve_requested_target that handles both specific tags and "latest" resolution
- For main branch, resolve "latest" to newest reachable release tag
- For testing/development branches
2026-03-26 10:44:12 +01:00
frdel
68ad5aca46 Remove return URL persistence from self-update flow
Replace sessionStorage-based return URL tracking with simple page reload after backend restart. Remove getSavedReturnUrl, saveReturnUrl helper methods and SELF_UPDATE_RETURN_URL_KEY constant. Update tests to verify removal of URL persistence code.
2026-03-26 09:35:42 +01:00
keyboardstaff
dae37ee0f6 Rebuild test suite & update documentation 2026-03-26 01:12:22 -07:00
keyboardstaff
07b5e056e0 chore: delete all legacy WebSocket system files 2026-03-26 01:07:38 -07:00
frdel
27829350ae Add ready branch to Docker workflow and refactor self-update to use preloaded version selector
Some checks are pending
Build And Publish Docker Images / plan (push) Waiting to run
Build And Publish Docker Images / build (push) Blocked by required conditions
- Add ready branch to Docker publish workflow alongside testing and main
- Replace tag search/autocomplete UI with standard select element preloaded with current major version tags
- Add get_selector_tag_options helper that filters tags to current major line and returns list of higher major versions available
- Show attention banner with Docker update guide link when newer major versions exist on selected
2026-03-26 08:45:23 +01:00
frdel
ce295c95db Add automatic Docker builds when release tags reach testing/main branches
Extend docker_release_plan.py to detect when a new release tag becomes the highest tag on testing or main branches via push events. Track before/after SHAs to compare tag states and trigger builds for newly promoted tags. Add push_promoted_tag mode alongside existing tag push handling. Update workflow to trigger on branch pushes and pass ref type, before/after SHAs to planning script.
2026-03-26 08:22:18 +01:00
frdel
07386c6801 Add remote branch tag fetching with cache and fallback to local tags
- Add _get_remote_branch_merged_tags to fetch tags from official repo via temporary bare clone
- Add _remote_branch_tag_cache with 60-second TTL to reduce redundant fetches
- Add _get_official_remote_url helper for consistent remote URL construction
- Rename existing _get_branch_merged_tags to _get_local_branch_merged_tags
- Update _get_branch_merged_tags to prefer remote tags with fallback to local
- Add REMOTE_BRANCH_TAG_CACHE_TTL_SECONDS constant
2026-03-24 21:23:06 +01:00
frdel
f7d68d3410 Add backend disconnect detection and button type attributes to self-update modal
- Add observedBackendUnavailable flag to track backend state transitions
- Update restart flow to wait for backend disconnect before reload
- Add intermediate restart states: "Restarting backend" and "Update in progress"
- Change health check logic to require backend unavailability before reload
- Handle restart request errors with proper HTTP status validation
- Add type="button" to all modal footer buttons to prevent form submission
2026-03-24 21:15:28 +01:00
frdel
78ea2040a9 Add tag existence validation to self-update system
- Add tag verification in schedule_update before accepting update requests
- Check if selected tag exists on target branch via get_available_tags
- Add tagExistenceWarning computed property to display branch-specific errors
- Add tagExistenceChecked state flag to track validation status
- Implement onTagBlur handler to validate tag on input blur
- Add frontend validation in scheduleUpdate before API submission
- Change tag dropdown clicks from @
2026-03-24 21:09:38 +01:00
frdel
ded0f480c8 Simplify version tag format from vX.Y.Z to vX.Y, enforce v1.0 minimum
- Change version tag format from `v{epoch}.{major}.{minor}.{rest}` to `v{major}.{minor}`
- Raise minimum selector version from v0.9.9 to v1.0
- Update tag parsing to require exactly two version segments
- Add numeric sorting for version tags (e.g., v1.10 > v1.9)
- Update major version compatibility check to compare first number only
- Improve validation messages: "vX.Y.Z" → "vX.Y", add "v1.0 or newer" requirement
- Clear default
2026-03-24 20:59:20 +01:00
frdel
75b8085b65 Add unzip to Docker base packages, refactor API key handling, improve self-update system
- Add unzip package to Docker base installation
- Remove deprecated missing API key banner extension
- Refactor API key management: clear drafts on init, track dirty state, allow empty string saves
- Add version filtering to self-update: enforce minimum v0.9.9, validate tag format
- Improve self-update UI: convert howto to Bootstrap collapse, fix branch selector reactivity, group tag suggestions
- Fix settings
2026-03-24 17:17:19 +01:00
Alessandro
db15bdb3bf refactor: extract browser agent into built-in plugin
Move the Browser Agent/browser-use stack into a tracked built-in
`_browser_agent` plugin while preserving the current model/config flow.

Changes:
- add built-in `_browser_agent` plugin with tool, helpers, prompts, assets,
  status API, and WebUI message/status surfaces
- move browser-use wrapper and monkeypatch ownership out of `models.py`
  into plugin helper code
- keep browser model resolution on the `_model_config` path and continue
  using the effective Main Model / chat model config
- remove stale Browser HTTP Headers UI and outdated browser-model wording
- make Playwright runtime resolution bootstrap-only and stop installing
  browser binaries on demand
- switch browser log rendering to plugin-owned WebUI extension handling
  with core fallback compatibility for old logs
- delete obsolete core browser tool/helpers/prompts/assets after plugin
  resolution is in place
- update docs to reflect built-in plugin ownership and Main Model browser
  behavior

feat(browser-agent): improve lifecycle reliability, LLM compatibility, and local-dev bootstrap

- **Lifecycle Reliability**: Implemented stale Chromium lock file cleanup and one-shot ephemeral profile fallback to prevent CDP connection hangs and profile-locked crashes.
- **LLM Compatibility**: Added OpenRouter/Gemini shims including schema compaction, system instruction injection, and JSON output normalization for `browser-use` validation.
- **Cache Alignment**: Reverted Playwright browser cache to `tmp/playwright` for parity with core behavior and updated Docker scripts and documentation accordingly.
- **Local-Dev Bootstrap**: Added a plugin `install()` hook to automate Python dependency setup and transitioned bootstrap feedback to UI notifications.
- **Plugin Config**: Set `always_enabled: false` to allow users to opt-out or bring their own browser providers.
- **Testing**: Expanded test suite to cover lifecycle edge cases, LLM normalization, and bootstrap logic.

rework clean up browser agent sessions on reset/removal

Force browser-agent teardown to use BrowserSession.kill() so keep_alive sessions do not leave Chromium running and keep the profile locked. Add centralized browser state cleanup for reset/context removal and regression tests to cover the new teardown path and prevent SingletonLock fallbacks from stale sessions.

add browser agent thumbnail

restore local dev for Playwright in browser agent via hook

- Introduced a new hook to bootstrap Playwright for local development, ensuring the Chromium headless shell is installed when in development mode.
- Updated the Playwright helper to call the new hook if the binary is not found during the binary check.
- Added tests to verify the correct installation and behavior of the Playwright binary in local development scenarios.

proper install notifications for Playwright in local dev

- Added notification management for Playwright bootstrap process, including info, success, and error notifications.
- Enhanced the `bootstrap_local_dev_playwright` function to notify users about the installation status of the Playwright runtime.
- Updated tests to verify the correct notifications are sent during the Playwright installation process.

rework browser state cleanup extensions for agent context removal and reset

- Added `CleanupBrowserStateOnRemove` and `CleanupBrowserStateOnReset` extensions to handle browser state cleanup when an agent context is removed or reset.
- Updated `cleanup_browser_agent_state` function to utilize new protocols for better type safety and clarity.
- Enhanced the `State` class to ensure proper cleanup of browser sessions and user data directories.
- Introduced tests to validate the cleanup functionality and ensure browser sessions are correctly managed during agent lifecycle events.

enhance Playwright cache handling

- Updated Playwright helper to include support for a new cache directory at `.cache/ms-playwright`, aligning with standard cache locations.
- Modified the `get_playwright_search_dirs` function to incorporate the new cache path.
- Added a new test to verify the retrieval of the Playwright binary from the repository's `.cache/ms-playwright` directory, ensuring proper functionality across different cache locations.
- Updated existing tests to reflect changes in cache path handling.

update docs and README.md

restore local dev bootstrap and async-safe teardown

Keep Browser Agent bootstrap local in development, matching pre-extraction behavior, by removing the RFC filesystem hop from Playwright cache setup. Restore on-demand local-dev bootstrap through plugin hooks before browser-use import, so missing browser packages and runtime can be installed on first use.

Rework browser session teardown to be async-safe during reset and cleanup, avoiding nested event loop shutdown failures while still terminating the browser worker cleanly. Also remove redundant browser-use patch application and add regression tests covering local bootstrap, reset-time async shutdown, and lifecycle cleanup.

playwright bootstrap via plugin hooks

[Fixed][P1] The hook-based restore was architecturally in the right place, but it was too late to recover a missing local browser_use / playwright install. The browser tool imports browser_use at module load time, and tool loading silently skips modules that fail to import, so the plugin install() hook could never rescue the first browser invocation if those packages were absent. I fixed that by calling the plugin install hook before importing browser_use in local development: browser_use.py, browser_use.py, agent.py, test_browser_agent_playwright_bootstrap.py.

[Fixed][P3] The Browser Agent UI and runtime error text still claimed on-demand install did not exist, which contradicted the intended local-dev bootstrap path. I corrected both messages so they now describe the real behavior: main.html, playwright.py.

rm tests

restore old browser use logic files

restore old browser working behaviour

browser: migrate cleanup hooks to new extensible paths

Update Browser Agent cleanup extensions to the new deep @extensible path layout introduced in 7e1d9ad2a4, so AgentContext reset/remove hooks fire again after the framework migration.

`This restores browser state cleanup when chats are reset or deleted, preventing keep-alive browser sessions from surviving context removal and leaving chats stuck until restart. The change also keeps the recent browser regressions covered with focused tests for Anthropic/OpenRouter action normalization, keep-alive session teardown via kill(), and extension discovery under the new _functions/... path structure.`

Update messages.js

update docs
2026-03-23 15:21:57 +01:00
frdel
a5620506d5 refactor: rename state_sync namespace to webui and simplify handler event registration
- Rename /state_sync namespace to /webui throughout codebase
- Remove get_event_types() from WebSocketHandler - handlers now process all events for their namespace
- Replace per-event handler registration with namespace-wide registration
- Add validate_event_type() class method for runtime event name validation
- Update UserMessage instantiation to use keyword arguments (message=, attachments=)
- Move send_data
2026-03-20 15:34:59 +01:00