Commit graph

417 commits

Author SHA1 Message Date
Alessandro
d47207dfd7 Refine host browser routing and settings copy
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
Store and surface host-browser preparation and CDP endpoint metadata from A0 CLI.

Let Browser runtime prepare candidate CLIs before the first action, and keep host-required errors more actionable.

Simplify Host Browser settings language and document the Chrome remote-debugging consent flow.
2026-05-08 06:37:32 +02:00
Alessandro
4b3e2eb327 Route Browser through A0 host connector
Integrate host-browser routing into the existing Browser tool. Store connector host-browser metadata, add pending browser op resolution, select connector runtimes from Browser settings, enforce host-content privacy policy, support automatic host preparation, and document the A0 CLI host-browser flow.
2026-05-08 04:22:18 +02:00
Alessandro
06a83030c0 Remove browser chat action button
Delete the Browser plugin's injected bottom-action button so it no longer appears under the chat input while preserving the rest of the Browser surface entry points.

Update the browser regression coverage to assert the chat action stays absent.
2026-05-08 00:36:36 +02:00
Alessandro
fa0d2beaf2 Clean up legacy runtime artifacts
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
Remove stale runtime directories and expand retired package coverage for startup/self-update cleanup.

Discover installed collaboraoffice* split packages dynamically so future package-name changes are still purged, and extend Office cleanup tests for the legacy /opt paths, known leftover packages, idempotency, and marker rerun behavior.
2026-05-07 20:20:52 +02:00
Alessandro
8b921a8ded Move Browser Playwright cache to tmp
Use /a0/tmp/playwright as the Browser plugin Chromium cache and Docker install target while preserving full Chromium installs.

Add startup migration cleanup for retired usr Playwright caches, update Browser status/runtime references and docs, and cover migration behavior with focused regressions.
2026-05-07 18:43:24 +02:00
Alessandro
bb86e5a7a9 Associate connector hello metadata with chat context
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
Store remote tool metadata through a dedicated hello path, bind a declared context id to the websocket SID, and return acknowledged remote tool state so clients can verify gated tools such as code_execution_remote are visible to the active chat.
2026-05-07 03:47:03 +02:00
Alessandro
28a0b35ad4 Show Desktop install progress during runtime prep
Track active Desktop runtime preparation in the _desktop hook, expose installing status through Desktop session status, and have the Desktop frontend poll with a neutral install message instead of showing missing dependencies while packages are still being installed after an update.
2026-05-07 03:22:41 +02:00
Alessandro
ef011600ef Serialize runtime package preparation
Run Office and Desktop apt operations through a shared in-process retry guard so startup/self-update hooks wait out transient apt locks instead of failing early. Include LibreOffice runtime packages in Desktop preparation because Desktop status and Writer/Calc/Impress launch paths require soffice, and cover both behaviors with regression tests.
2026-05-07 03:14:12 +02:00
Alessandro
3368fccb3c Rename document skills and harden skill ownership
Rename Office skills to product-neutral Writer, Calc, Impress, and document-artifact names while removing the visible legacy directories. Tighten connector list/delete behavior to the enabled catalog and prevent deletion of built-in plugin skills; also surface invalid skill YAML instead of silently accepting it.
2026-05-07 00:15:34 +02:00
Alessandro
0c08fa65f3 Reduce Office to document ownership
Keep _office focused on document artifacts, Markdown sessions, LibreOffice-compatible file actions, and document persistence. Route binary document editing through explicit Desktop requests instead of cold-opening the live Desktop surface from artifact results.
2026-05-07 00:15:15 +02:00
Alessandro
76a282ba8f Move Linux Desktop runtime into _desktop
Add the built-in _desktop plugin as the owner of Xpra/Xfce lifecycle, /desktop route installation, Desktop state, session APIs, surface registration, and the linux-desktop skill. Leave _office with explicit compatibility facades and self-update delegates so users coming from 1.10 through 1.13 keep their runtime cleanup path.
2026-05-07 00:14:54 +02:00
Alessandro
022b6f031f Split live surfaces out of modals
Introduce the shared surfaces frontend service and stylesheet so Browser and Desktop can register docked or floating live UI without special cases in modals.js. Update Browser and right-canvas integration to preserve active viewers across canvas/modal switches and avoid creating blank tabs unless explicitly requested.
2026-05-07 00:14:31 +02:00
Alessandro
9950aa4f59 Keep Office canvas documents live after edits
Reload LibreOffice-backed Writer, Spreadsheet, and Presentation documents after artifact edits by closing and reopening the visible document window instead of relying on a canvas repaint.

Cold-start Office canvas sessions from tool results, guard null document headers during initial render, and avoid terminating rehydrated desktop processes from temporary manager instances.
2026-05-05 19:01:32 +02:00
Alessandro
0d9a7cd65d Polish Office canvas document controls
Unify Markdown and LibreOffice document handling around an active-file header in both canvas and modal views. Move creation into a shared + New menu, place Save beside file actions, and expose Rename/Close File from the document dropdown. Update the README with the refreshed Office and Browser screenshots plus the new Office UI behavior.
2026-05-05 18:17:36 +02:00
Alessandro
278a696b8e Align Time Travel modal with settings shell
Remove Time Travel's floating modal behavior so it uses the standard centered modal shell and shared backdrop like Settings. Keep the modal-only sizing classes on the component document and stop exempting Time Travel from backdrop rendering.
2026-05-05 17:33:59 +02:00
Alessandro
a174072e67 Generalize Desktop CLI agent guidance
Refine the Linux Desktop skill so agents distinguish shell prompts from target CLI prompts before sending natural-language input.

Use a generic nested CLI-agent launch pattern with TARGET_CLI and optional FALLBACK_CMD instead of Codex-specific instructions, and add canvas setup assertions to keep the guidance generic.
2026-05-05 17:18:09 +02:00
Alessandro
d3c249cbdd Add Browser v1 explicit screenshot and form actions
Adds the explicit browser:screenshot action that writes JPEG/PNG files for vision_load, extends agent-callable Browser input actions, and documents the explicit vision workflow.

Adds the browser-forms on-demand skill and regression coverage for dispatch, runtime screenshot files, ref point resolution, upload path normalization, prompt discoverability, and label-wrapped form controls surfaced by the chat-driven E2E.
2026-05-05 15:54:13 +02:00
Alessandro
f9175ed00b Stabilize Browser modal switching
Keep Browser modal activation passive when switching from Desktop by reusing existing Browser sessions instead of creating a blank tab on viewer subscribe.

Add a Focus mode control to the Browser modal header matching Desktop's fullscreen/restore behavior.

Cover the passive subscribe path and Browser modal focus button in regression tests.
2026-05-05 14:34:42 +02:00
Alessandro
9390e42bcc Persist Agent Zero Desktop lifecycle
Keep one Xpra Desktop iframe alive across canvas, modal, and keepalive hosts instead of unloading it during normal UI handoffs. Add intentional shutdown/restart state so explicit shutdown is treated as closed, not crashed.

Add the desktop_shutdown Office API path, backend system-desktop shutdown cleanup, and an XFCE panel Shutdown Desktop launcher that requires a second click before writing the shutdown request marker. Hide unsafe logout, lock, and switch-user affordances and cover the lifecycle with focused tests.
2026-05-05 12:20:49 +02:00
Alessandro
78570e5689 Improve Linux Desktop state controls
Add a desktop_state helper, expanded desktopctl observe-act-verify commands, backend desktop_state support, Extra prompt state, and Xpra bridge diagnostics for the built-in Linux Desktop.

Update the Linux Desktop skill so agents prefer structured/app-native/keyboard workflows, treat coordinate clicks as last resort, and verify terminal or CLI-agent work with fresh final screenshots. Cover the behavior with focused Office desktop state, canvas setup, and office_session tests.
2026-05-05 11:20:50 +02:00
Alessandro
2398bd1601 Make Office artifacts ODF-first
Promote LibreOffice-native ODT, ODS, and ODP as first-class defaults for Writer, Spreadsheet, and Presentation while keeping OOXML as explicit compatibility formats.

Add ODF package generation, validation, read/edit support, and focused tests for Markdown, ODT, ODS, ODP, DOCX, XLSX, and PPTX artifact behavior.

Reduce automatic document response triggering so meta-discussions about generated files do not create artifacts, while explicit file and canvas requests still work through the intended Markdown editor or Desktop affordance.

Preserve the native A0 browser launcher, sync the live container, and validate the flow with real chats and Playwright.
2026-05-05 10:01:09 +02:00
Alessandro
d326513983 Defer office runtime preparation during startup
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-05-04 23:04:06 +02:00
Alessandro
2d389af727 Defer Office desktop startup
Some checks failed
Build And Publish Docker Images / plan (push) Has been cancelled
Build And Publish Docker Images / build (push) Has been cancelled
Make the Office canvas mount passive so Xpra starts only when the Desktop surface is opened or an official Office document is created/opened.

Track Desktop host visibility to unload hidden frames, stop monitors, dedupe viewport resize work, and set Xpra offscreen mode according to HTTPS support. Add a near-future note for the tunnel memory footprint.

Show Office desktop startup progress

Display a loading message while the Agent Zero Desktop environment is starting or restarting, so the right-canvas Desktop button gives immediate feedback before Xpra finishes waking up.
2026-05-03 03:26:04 +02:00
Alessandro
48977bffc5
Merge pull request #1596 from ruizanthony/fix/code-execution-pty-fd-leak
fix(code_execution): close PTY file descriptors
2026-05-03 02:16:01 +02:00
Alessandro
d37500967f Restart browser runtime after stale context
Detect cached Playwright contexts that have already closed before reusing the browser runtime.

Clear stale browser pages, popup waiters, screencasts, and interaction state; stop the old Playwright instance; and restart cleanly on next use. Add regression coverage for stale context recovery and unexpected context close events.
2026-05-03 01:55:24 +02:00
Alessandro
3df27ccec3 Handle optional Xpra codec gaps on ARM64
Treat local Xpra GUI client packages as best-effort during Office runtime preparation so ARM64 codec dependency gaps do not surface as startup warnings when the browser-hosted Desktop is already usable.

Keep required Desktop Xpra packages strict, trim the ARM Docker fallback to the server/X11/html5 set, and add regression coverage for optional versus required xpra-codecs/libvpx9 failures.
2026-05-03 01:53:02 +02:00
Alessandro
677a0c1e64 Bridge desktop URLs into Browser
Register the Agent Zero Browser as the Desktop URL handler, queue URL intents from the Xfce environment, and route them into Browser on the opposite canvas/modal surface. Also make floating Browser and Desktop modals pass outside clicks through while preserving interaction inside the modal window.
2026-05-03 00:57:56 +02:00
Alessandro
6d9dedb821 Fix Office desktop runtime on arm64 2026-05-03 00:27:23 +02:00
Agent Zero Local
eecbb5ba34 fix(code_execution): handle closed PTYs while reading output 2026-05-02 21:33:08 +00:00
Agent Zero Local
d4eaa7c030 fix(code_execution): avoid double-close of PTY master fd
Use a shared mutable holder for the POSIX PTY master fd and invalidate it before close. This keeps EOF cleanup and TTYSession.close()/kill() idempotent and prevents closing an unrelated resource if the OS reuses the old fd number.
2026-05-02 21:32:12 +00:00
Agent Zero Local
a0f0c2e8d2 fix(code_execution): recover from closed PTY sessions
Detect closed or exited local TTY sessions before writing, convert invalid PTY write errors into retryable session failures, and reset/retry the terminal session once after send/read failures.
2026-05-02 21:32:12 +00:00
Agent Zero Local
2ce1947b0f fix(code_execution): close PTY file descriptors
Store and close POSIX PTY master descriptors when terminal sessions are closed or killed, and make local terminal session shutdown await the full TTY cleanup path. This prevents leaked /dev/ptmx descriptors from exhausting the process file descriptor limit.
2026-05-02 21:32:12 +00:00
Alessandro
dd696732c8 Fix canvas markdown rename before save
Route Office canvas renames through the document store so dirty or missing-on-disk Markdown sessions can be materialized at the new path without hitting the generic workdir filesystem rename endpoint. Add regression coverage for missing draft materialization, dirty markdown rename, and the custom rename hook contract.
2026-05-02 20:51:58 +02:00
Alessandro
5f2ef4f1da Hide Xfce browser and mail menu entries
Add local XDG overrides for the xfce4-mail-reader.desktop and xfce4-web-browser.desktop application IDs shipped by the current desktop runtime, while keeping the older exo-* IDs covered for compatibility. Update the desktop profile tests so future changes assert both generations of launcher IDs.
2026-05-02 20:48:14 +02:00
Alessandro
d8c0d6b9fe Fix Time Travel snapshot resilience
Force-add curated snapshot paths so workspace .gitignore rules cannot break Time Travel snapshots, while preserving Time Travel's own exclusions for secrets and generated files.

Repair invalid shadow Git repositories by restoring HEAD when possible or quarantining and reinitializing unusable repos, and canonicalize workspace paths to avoid duplicate shadow histories for aliases.

Add regression coverage for ignored paths, corrupt shadow HEAD recovery, and canonical workspace identity.
2026-05-02 20:27:28 +02:00
Alessandro
d6d97d037c Fix skills selector unloading
Remove dynamically loaded skills when they are deactivated from the Skills selector. Treat skill names and paths as aliases so scoped defaults, chat overrides, and loaded-skill state resolve consistently.
2026-05-02 20:14:49 +02:00
Alessandro
0da8f3dc2b Add OAuth disconnect and remaining quota visibility
Allow users to disconnect their OpenAI account by clearing stored ChatGPT OAuth tokens while preserving unrelated auth data.

Fetch and normalize Codex usage windows, then show remaining percentage and reset timing in the OAuth settings UI.

Add focused tests for usage parsing and disconnect cleanup.
2026-05-02 20:14:04 +02:00
Alessandro
e63173d812 Polish Agent Zero Desktop defaults
Show hidden files by default in Thunar-backed Desktop sessions while preserving existing file manager profile settings.

Hide the default Xfce Mail Reader and Web Browser helper entries from the Applications menu through local XDG overrides, and cover the generated Desktop profile artifacts with targeted tests.
2026-05-02 20:04:37 +02:00
Alessandro
c553e91c03 Add Browser extension UI open action
Detect openable Chrome extension UI pages from manifests and expose resolved chrome-extension URLs to the Browser UI.

Render an Open button in the compact Browser extension dropdown and cover manifest UI metadata with regression tests.
2026-05-02 20:02:28 +02:00
Alessandro
92ae20da2c Add Desktop habitat README
Install a curated README into generated Agent Zero Desktop sessions so the Xfce workspace explains the habitat concept, credits the open-source foundations and Jan Tomášek, and gives users Terminal commands for popular agent CLIs.

Keep the README as an _office plugin asset and copy it into the Desktop profile during launcher preparation.
2026-05-02 19:51:07 +02:00
Alessandro
27b3624a97 Add Office document rename action
Add a pencil action beside Save that reuses the existing file browser rename modal for open Office documents. Preserve document metadata after filesystem renames, retarget active LibreOffice desktop sessions to the new path, and cover the rename flow in Office regression tests.
2026-05-02 19:31:53 +02:00
Alessandro
e64b9b2538 Remove legacy Office canvas affordances
Route DOCX, spreadsheets, and presentations exclusively through the Xpra desktop LibreOffice session. Keep the custom canvas path focused on Markdown source editing, remove the old dashboard/preview/native LibreOfficeKit code, and update tests and runtime package declarations to match the new Office surface.
2026-05-02 19:24:49 +02:00
Alessandro
739c0a18a3 Improve Office desktop integration
Route binary Office documents through the persistent Desktop surface while keeping Markdown in the custom tabbed editor.

Harden Xpra clipboard bridging and explicit clipboard flags so host paste can reach the desktop session.

Align XFCE and LibreOffice profile paths with Agent Zero locations: downloads for wallpapers, configured workdir for default saves and the Workdir shortcut, and trusted metadata for generated launchers.
2026-05-02 18:39:32 +02:00
Alessandro
2f5f98521d Fix Desktop cursor and canvas resize handoff
Make the embedded Xpra Desktop use the browser cursor as the only visible cursor by suppressing the shadow pointer overlay and pointer-position renderer without blocking pointer input.

Prefer the active Office host iframe when choosing the Desktop frame, then force resize recovery during modal-to-canvas docking so the Xpra desktop, window, and canvas refill the canvas after handoff.
2026-05-02 18:05:39 +02:00
Alessandro
74dcb32814 Fix Desktop Xpra keyboard focus capture
Make the Desktop iframe explicitly focusable and re-arm Xpra keyboard capture on load and click so typed input reaches the remote session reliably.\n\nAdd regression assertions for the Xpra keyboard bridge contract.
2026-05-02 17:51:27 +02:00
Alessandro
ad7925b543 Enable clipboard shortcuts in Browser visual mode
Bridge copy, cut, paste, and common edit shortcuts from the Browser modal and canvas screenshot surface into the Playwright runtime while preserving native clipboard behavior for Agent Zero UI fields.

Add websocket and runtime clipboard handling with regression coverage for frontend shortcut routing, paste fallback, and viewer input dispatch.
2026-05-02 17:21:44 +02:00
Alessandro
ae94f158df Make Time Travel modal-only
Add a Time Travel entry directly under Files in the sidebar dropdown and route it through the existing modal. Stop Time Travel from registering or mounting a right-canvas surface, and keep modal refresh tied to the modal state.
2026-05-02 17:20:05 +02:00
Alessandro
9fc3ff20a4 Add browser extension uninstall controls
Expose extension deletion from the Browser internal settings page and keep the compact Browser dropdown focused on quick enable/install actions.\n\nAdd a guarded uninstall API that only deletes Browser-managed extension folders, updates enabled extension paths, refreshes the settings UI, and covers managed versus external paths with regression tests.
2026-05-02 17:05:33 +02:00
Alessandro
39a96012f9 Make browser annotation tray draggable
Fix annotation panel stacking so draft popovers render above the annotations recap.\n\nAllow the annotations recap tray to float within the browser stage by dragging its header, with bounded positioning and cleanup when annotations are cleared or the browser surface unmounts.
2026-05-02 16:55:50 +02:00
Alessandro
c2fb2c3c94 Add browser screenshot previews to tool messages
Render Browser tool Screenshot KVPs as clickable live thumbnails that open the Browser canvas while preserving the existing lower-row Browser action.\n\nAdd a lightweight websocket snapshot endpoint for existing browser runtimes and keep preview frame memory bounded with revocable object URLs.
2026-05-02 16:48:38 +02:00