Commit graph

52 commits

Author SHA1 Message Date
Alessandro
70adbe91a0 Polish Editor and Browser surface cleanup
Remove obsolete Office markdown editor UI and handoff code now that Markdown lives in the dedicated Editor surface.

Harden the Editor modal so it opens directly into a Markdown draft and rebinds Ace to the visible root when switching surfaces.

Make Browser address Enter navigation explicit and update the canvas setup expectations for the slimmer Office shell.
2026-05-15 12:38:29 +02:00
Alessandro
89901b64f0 Polish native Markdown editor experience
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
Expand the dedicated Editor surface with safe rendered preview mode, ACE-backed source editing, browser-style tabs, toolbar/file actions, preview search, and richer Markdown rendering for code blocks, task lists, images, tables, math, local links, and footnotes.

Keep open Markdown files synchronized with the active context and saved tool edits, including live refresh for document_artifact and text_editor results without routing Markdown through Desktop/Office.

Add inline preview-page editing, clickable preview task-list checkboxes, source editor rehydration after preview-mode refreshes, and regression coverage for the new editor wiring and sync behavior.
2026-05-15 04:47:24 +02:00
Alessandro
330a0c5790 Split Markdown editor into dedicated surface
Add a builtin _editor plugin that owns Markdown API/WebSocket sessions, canvas and modal UI, live refresh, tabs, prompt Extras for active-context open files, inline close confirmation, and Close All handling.

Route Markdown document artifacts to Editor while keeping Office/Desktop focused on LibreOffice formats, and update Desktop/Office prompts, menus, compatibility shims, and regression coverage.
2026-05-15 02:41:41 +02:00
Alessandro
68c3b8b022 Move office and desktop state under plugin storage
Migrate retired /usr/_office and /usr/_desktop trees from plugin startup into /usr/plugins/<plugin>. Update office document storage, desktop session/runtime paths, and context-scoped screenshots to use the plugin-owned state layout. Add focused tests for retired-state migration and the new path behavior.
2026-05-12 16:21:43 +02:00
Alessandro
55474443c9 Stabilize document artifact affordances
Make file creation opt-in through document_artifact, move document file cards to final responses, and keep the tool payload as a quiet execution record.

Deduplicate response cards by file identity, refresh open Desktop canvas sessions after saved edits, and harden document_artifact edit input normalization for common append/update shapes.

Update prompts, skills, styles, and regression coverage for response-only file actions and explicit-only canvas opening.
2026-05-12 06:59:22 +02:00
Alessandro
daf95ec3ab Normalize tool contracts and slim prompt surface
Standardize multi-action tools around tool_args.action while keeping parser compatibility for older tool/args, tool_name:action, and method-shaped requests. This keeps new prompts clean without breaking agents that learned the previous dialect.

Move A0 connector remote execution/file tools into stable standard prompts, make remote targeting independent of the active chat context, and skill-gate beta computer-use remote so it no longer weighs down the always-on tool list.

Align text editor, scheduler, skills, office artifact, memory, notify, and browser prompts/tools around the canonical action contract. Add scheduler update/timezone handling, skills_tool read_file, text editor patch coverage, and fixes for memory_forget, behaviour_adjustment, and code execution progress warnings.

Reduce default prompt pressure by compacting browser and scheduler prompts into skill-backed manifests, shortening skill catalog descriptions, and pruning noisy framework knowledge. Remove obsolete connector prompt stubs and root tool-call knowledge examples.

Tests: conda run -n a0 pytest tests/test_a0_connector_prompt_gating.py tests/test_tool_action_contracts.py tests/test_task_scheduler_timezone.py tests/test_text_editor_context_patch.py tests/test_tool_request_normalization.py tests/test_office_document_store.py::test_odf_is_advertised_and_docx_remains_explicit_compatibility tests/test_office_document_store.py::test_document_artifact_accepts_method_alias_for_ods_create tests/test_skills_runtime.py tests/test_default_prompt_budget.py::test_a0_small_profile_removed_and_prompt_text_generic -q
2026-05-09 21:54:43 +02:00
Alessandro
02838f7698 fix(office): retire legacy Collabora during self-update
Stop and remove the old a0_office_collabora supervisor program during Docker self-update preparation, before stale Collabora runtime paths are deleted. Add a narrow repo-side retirement hook so older bootstrap managers can clean the checked-out runtime without reinstalling desktop packages during health checks.

Harden XFCE desktop startup with explicit XDG config/data directories so upgraded Desktop sessions avoid the failsafe-session path after the Collabora-to-LibreOffice transition.
2026-05-09 15:09:45 +02:00
Alessandro
bb2432693e Fix canvas attachment for browser and documents
Attach the Browser canvas to active Docker sessions by returning an initial snapshot on subscribe and preserving valid frames through state-only updates. Route Markdown document opens through the right-canvas Desktop editor instead of the legacy office modal. Skip automatic office document response affordances for subordinate agents so delegated reviews keep their actual content.
2026-05-08 19:08:53 +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
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
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
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
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
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
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
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
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
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
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
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
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
ff828e294e Add plugin thumbnails 2026-04-28 15:04:19 +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
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
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
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
10e8f5d01a canvas + browser CSS polish 2026-04-27 00:16:58 +02:00