Commit graph

385 commits

Author SHA1 Message Date
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
Alessandro
90ae70eb6e Merge ready into browser multi-tab PR 2026-05-02 15:56:16 +02:00
Alessandro
12b96ae41e Harden browser multi-tab focus handling 2026-05-02 15:49:05 +02:00
Alessandro
3466160e4c Harden Office canvas sync and PPTX output
Sync document_artifact results into an already-open Office canvas without auto-opening a closed canvas.

Generate PPTX artifacts through the Office plugin writer so PowerPoint decks open in Impress with visible multi-slide content.

Add focused regression coverage for canvas sync behavior and PPTX slide creation.
2026-05-02 15:28:43 +02:00
Alessandro
04926a3a65 Harden Office artifact workflows
Keep Office document artifacts from auto-opening the canvas while adding plugin-owned Download and Open in canvas message actions. Add format-specific skills for Markdown, Word, Excel, and presentation workflows, and clarify the startup-warmed Desktop runtime remains visually opt-in.\n\nCover the Excel method=create path, Markdown-first/no-auto-open policies, response affordance copy, document action buttons, and Desktop bootstrap with focused regressions.
2026-05-02 14:46:56 +02:00
Alessandro
aea1718f9f Revert "Show active models for Default LLM"
This reverts commit 7c59ac9e57.
2026-05-02 14:12:25 +02:00
Alessandro
baac20f7a4 Fix Office artifact creation and canvas closing
Add an explicit close button to the right canvas toolbar, next to the undock control, and cover its label, handler, and ordering in the canvas regression test.

Treat document_artifact tool_args.method as an action alias so calls like method=create with format=xlsx create workbooks instead of falling back to LibreOffice status. Add regression coverage for the exact XLSX creation shape.
2026-05-02 14:08:35 +02:00
Alessandro
ce7ec3cb4c fix(canvas): keep browser and office surfaces opt-in
Make Markdown the first-class document workflow in the office skills and state the Desktop/LibreOffice path as opt-in for GUI or binary Office work.

Remove passive Browser canvas auto-opening from tool results; Browser result handling now only syncs an already-open Browser canvas, while explicit user buttons can still open the canvas or modal. Add regression coverage for the no-auto-open policy and Markdown-first skill guidance.
2026-05-02 14:08:35 +02:00
Alessandro
1a32d3a295 fix(desktop): stabilize Xpra viewport resizing
Make Desktop canvas and modal handoffs resize the live Xpra viewport deterministically by syncing the visible frame, making backend resize requests authoritative, unloading hidden iframe clients, and guarding Xpra HTML menu callbacks when the menu is disabled. Also forwards wheel events from the embedded Xpra canvas so mouse and trackpad scrolling reach the Linux desktop session.
2026-05-02 14:08:35 +02:00
Alessandro
eb5220b058 fix(browser): read content inside shadow DOM
Teach the browser page-content helper to traverse open shadow roots and assigned slot nodes when collecting text, rendering list/inline children, and resolving selectors. This lets Agent Zero inspect modern component-heavy pages more accurately without depending only on light-DOM textContent.

Bump the injected helper version so existing browser contexts can refresh to the new DOM traversal behavior.
2026-05-02 13:07:10 +02:00
Alessandro
62ac20e7b2 feat(desktop): add Linux Desktop skill controls
Add a linux-desktop skill that teaches Agent Zero how to operate the persistent XFCE/Xpra desktop through desktopctl.sh, including app launch, focus, click, typing, and stable folder entry points for Workdir, Projects, Skills, Agents, and Downloads.

Add a Calc cell-edit helper that opens a workbook through the visible LibreOffice Calc desktop session, updates a requested sheet cell, saves, and verifies the XLSX on disk. Expand the Office canvas setup tests to cover Desktop branding, Xpra package requirements, resize behavior, mobile canvas gating, and the new skill helpers.
2026-05-02 13:07:10 +02:00
Alessandro
24dd548ebf feat(office-ui): introduce the Desktop document canvas
Rework the Office canvas into the Desktop surface, with Markdown editing for text documents and official LibreOffice/Xpra sessions for DOCX, XLSX, and PPTX. The panel now presents Desktop-oriented actions, named header buttons, persistent session tabs, adaptive modal/canvas sizing, and fast client-side Xpra frame fitting during resize.

Stop auto-opening the canvas from document tool results, hide the canvas on mobile-width layouts, and emit resize lifecycle events so embedded desktop surfaces can pause expensive work while the user drags.
2026-05-02 13:07:10 +02:00
Alessandro
10a6cd28c6 feat(office): replace Collabora with LibreOffice document runtime
Remove the Collabora/WOPI runtime and route stack, including the old status APIs, proxy helpers, bootstrap extensions, and WOPI store tests. Add the Markdown-first document store, LibreOffice status/conversion helpers, LibreOfficeKit session bridge, and reusable Xpra virtual desktop gateway used by the new document runtime.

Update image and self-update bootstrap paths so existing containers can acquire the LibreOffice, XFCE, Xpra, and desktop-control dependencies through the normal install hooks instead of an ad hoc manual install.
2026-05-02 13:07:10 +02:00
TerminallyLazy
5012dd3128 feat(browser): multi-tab awareness + modifier-key click
- Auto-register tabs opened by site (window.open, target=_blank,
  ctrl-click) via context.on("page",...) with registry lock and
  closing-state guard.
- Modifier-key click via Playwright trusted input: keyboard.down/up
  around mouse.click for coord-based path; locator.click(modifiers=...)
  selector fallback for off-screen / hidden elements. Chrome focus
  rule: ctrl/meta-click keeps focus on origin tab; override via
  focus_popup arg.
- key_chord action: presses keys in order, releases in reverse;
  guarantees release on exception. Supports Ctrl+A/C/V style chords.
- mouse modifiers click-only (raises ValueError for non-click events).
- list(include_content=true) bulk read across all tabs in parallel
  via asyncio.gather (was sequential).
- multi action: batched sub-calls. Different browser_id groups run
  concurrently; same browser_id sequentially. Returns array of
  {ok, result|error} matching input order. Lets the agent fan out
  reads or coordinated mutations across tabs in one tool call.
- Cross-tab work no longer steals viewer focus.
  last_interacted_browser_id promotes only on open / set_active /
  same-tab work / Chrome popup rule. WebUI auto-open allowlist
  tightened to open|navigate|set_active so background actions don't
  drag the viewer.
- New set_active action for explicit focus switch.
- JS helper bumps VERSION to force re-injection on cached pages;
  exports boundingBoxFor returning {x,y,w,h,selector} for the
  trusted-input modifier-click paths.

Backwards-compatible: every new arg is optional with safe defaults.
No removed actions; existing call shapes preserved.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-29 06:37:21 -04:00
Alessandro
7c71185f16 feat(a0-connector): lazy-load remote tool guidance
Some checks failed
Build And Publish Docker Images / plan (push) Has been cancelled
Build And Publish Docker Images / build (push) Has been cancelled
Move A0 CLI remote execution and file-editing guidance into skills, and gate compact remote tool stubs on subscribed CLI capabilities instead of always advertising unavailable tools. Retire verbose per-turn remote guidance extras while preserving connector protocol and tool schemas.
2026-04-28 16:14:53 +02:00
Alessandro
24812aabbb Fix Office session cleanup race
Keep newly-created Office sessions out of orphan cleanup so in-flight iframe loads do not lose their WOPI tokens during mount refreshes.

Add regression coverage for the fresh-session grace window while preserving cleanup for older orphaned sessions.
2026-04-28 16:14:53 +02:00
Alessandro
d387b1827f Fix Codex account SSE response recovery
Decode byte chunks from the live Codex/ChatGPT account SSE stream before parsing events.

Preserve accumulated output_text deltas when the final response.completed object is present but has no extractable output content.

Update the OAuth tests to cover byte-delivered SSE chunks and empty completed responses.
2026-04-28 16:14:53 +02:00
Alessandro
7c59ac9e57 Show active models for Default LLM
Expose sanitized active main and utility model metadata through the model override endpoint, then render those names in the chat model switcher even when no preset override is active. Keep the inline model names hidden on narrow screens and cover the behavior with a regression check.

Refresh model names after settings save

Refresh the active chat model switcher after _model_config settings are saved so changes to main and utility models appear immediately. Extend the model switcher regression check to cover the save-refresh hook.
2026-04-28 16:14:53 +02:00
Alessandro
332ffdcf4d Add ChatGPT Codex OAuth discovery banner
Add a discovery hero for the OAuth plugin below the Telegram, Email, and WhatsApp integration cards. The banner uses the supplied OpenAI artwork, opens the OAuth plugin settings, and adapts its copy when a ChatGPT/Codex account is already connected.
2026-04-28 16:14:53 +02:00
Alessandro
f67564a8ae Add Codex/ChatGPT account OAuth provider
Create a generic OAuth Connections plugin with Codex/ChatGPT Account as the first provider, using OpenAI's device-code flow to persist Codex-compatible account tokens.

Expose a loopback OpenAI-compatible wrapper for models, responses, and chat completions, and point LiteLLM at the container-local Agent Zero origin.

Add a dummy API-key extension and focused tests so the account-backed provider appears configured without requiring a user-entered key.

docs: add Codex plan OAuth callout

Highlight that Agent Zero can use an existing OpenAI Codex plan through the new OAuth flow.

Add the account-backed LLM plans image and surface the section from the README navigation, while pointing toward future Gemini CLI and Claude Code integrations.

Handle Codex account SSE chat chunks

Teach the Codex/ChatGPT account bridge to extract text from OpenAI-style SSE chat completion deltas and fall back to a normal output_text response when upstream only streams chunks.

Strip user-supplied stream kwargs before LiteLLM calls so Agent Zero owns streaming mode and custom parameters cannot pass stream twice.

Add targeted tests for streamed delta extraction and reconstructed responses.

update README.md with LLM plans mention
2026-04-28 16:14:53 +02:00
Alessandro
ff828e294e Add plugin thumbnails 2026-04-28 15:04:19 +02:00
Alessandro
b7ba8eff7f Improve browser session context lifecycle
Keep browser sessions context-qualified so tabs from different chats can coexist without closing on context switches.

Create a real chat context when Browser launches from dashboard/no selected context, preserving agent handoff for that session.

Move chat context detail out of visible tab labels and into hover tooltips using only real chat names, with regression coverage for the updated lifecycle.
2026-04-28 14:40:48 +02:00
Alessandro
df9523433d Improve Office canvas setup and dashboard UX
Replace the raw Collabora setup log with a simple Office setup progress state, redesign the Office dashboard around document cards with lightweight previews, and keep backend WOPI sessions aligned with visible Office tabs. Also preserve the restored Office canvas surface across window refreshes and add regression coverage for the new behavior.
2026-04-28 07:17:04 +02:00
Alessandro
9ec070793d Stabilize browser canvas screencast lifecycle
Restart the canvas screencast after page-changing commands and remount viewport metrics when starting or resizing streams so canvas scrolling stays smooth across first mount, new tabs, and navigation.

Move Browser JS off Alpine global store lookups and onto direct store imports, tighten modal/canvas handoff state, and keep annotations aligned with accepted viewport frames.

Improve Browser tab close ergonomics, allow Chromium native error pages to render without blocking the UI, include right-canvas tab polish, and expand regression coverage for these paths.
2026-04-28 07:02:40 +02:00
Alessandro
decb05a682 Stabilize browser viewer viewport rendering
Decode browser frames before display and only render frames that match the active viewer viewport, avoiding stretched stale screencast images during startup and resize.

Keep rejecting mismatched CDP screencast frames on the backend, extend canvas viewport settling, and cover the behavior with browser regression tests.

Include small browser panel CSS polish.
2026-04-28 04:29:33 +02:00
Alessandro
67bfd3e350 Add Office file tabs and session closing
Track open Office sessions as tabs so Docs, Sheets, and Slides can switch between files without losing the active editor context.

Add backend support to list and close WOPI sessions, revoking tokens and locks when a tab closes.

Show open-file metadata in the Office start view and keep the mobile canvas rail reachable after closing the canvas.
2026-04-28 04:29:33 +02:00
Alessandro
4f95250d0b Add native XLSX chart support
Teach document_artifact to create embedded spreadsheet charts through a native create_chart operation, including generic line/bar/column/pie/area/scatter support and stock-style OHLC charts.

Parse CSV, TSV, and Markdown table content into real XLSX cells during spreadsheet creation so chart ranges bind to typed data instead of row text blobs.

Update the Office artifact skill and tool prompt to prefer native chart creation over Python fallback, and cover the workflow with regression tests.
2026-04-28 04:29:33 +02:00
Alessandro
59e2350008 Debounce Time Travel snapshots with usr watchdog
Register Time Travel on Agent Zero's existing /a0/usr watchdog and coalesce automatic snapshot triggers into a single pending commit window capped at one commit per workspace every 10 seconds.

Exclude top-level /a0/usr plugins and nested Git worktrees from root snapshots, preserve self-root Git workspace tracking, and cover the behavior with Time Travel tests.
2026-04-27 19:06:13 +02:00
Alessandro
45933a47f1 Improve Office canvas artifact editing
Add read/edit support for Office document artifacts, including direct DOCX, XLSX, and PPTX updates with version history preservation. Inject compact active canvas metadata so agents can discover opened files without loading file contents. Move detailed usage guidance into the office-artifacts skill and keep the always-on tool prompt lean to avoid context bloat.
2026-04-27 18:56:20 +02:00
Alessandro
ad76578c47 Create chat context for browser launches
Allow the Browser surface to create and select a chat context when opened without an active context.

Reuse an in-flight context creation promise so repeated startup paths do not race, and update commands/viewer connection to ensure a context before calling browser websocket APIs.

Add a browser regression guard for the no-context startup path.
2026-04-27 17:44:57 +02:00
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
061b43298b Polish onboarding and email setup UX
Add a clearer onboarding progression for Main Model, Utility Model, and ready states with streamlined copy and calmer calls to action.

Rework email integration setup around provider-first selection, guided defaults, and cleaner account fields.
2026-04-27 03:00:09 +02:00