Commit graph

435 commits

Author SHA1 Message Date
Alessandro
f17198e126 fix: tighten tool guidance and editor workflows 2026-05-11 11:51:58 +02:00
Alessandro
6ba1f30dca fix: make memory cleanup update stale fragments 2026-05-11 11:51:58 +02:00
Alessandro
6d29268cbd refactor: align skills and tool guidance
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
Rename high-impact skills to task-oriented names and move plugin-owned skills into their owning plugin folders.\n\nAlign renamed skill frontmatter with the official SKILL.md standard by keeping trigger language in name/description metadata, replacing the old create-skill wizard with build-skill, and updating browser, A0 connector, computer-use, CLI setup, and scheduler skill references.\n\nTighten the recurring cross-provider guidance gaps surfaced by the evidence sweeps: memory requests now avoid promptinclude-file routing, scheduler prompts distinguish cron schedules from planned ISO dates, document questions prefer document_query, skills_tool search/read_file usage is clearer, normal notifications set info/priority 10, and local/host text editors preserve patch intent.\n\nUpdate regression tests for the renamed skills, plugin ownership, prompt budget reality, and standard frontmatter shape.
2026-05-10 07:13:14 +02:00
Alessandro
854a96e880 Treat bare desktop canvas as ready
Allow the Linux Desktop state collector to report a healthy canvas when XFCE has no active application window, as long as the display, visible windows, and screenshots are available.

Document the readiness rule in the linux-desktop skill and add regression coverage for the bare-desktop active_window=null case.
2026-05-10 00:07:04 +02:00
Alessandro
c8e239d5a2 Harden remote computer use readiness
Track computer-use CLI status, last error, and restore-token presence in connector metadata so stale Free Run settings are no longer treated as ready.

Materialize CLI-provided screenshot artifacts through Agent Zero's file helpers, stop dispatching computer_use_remote actions when metadata already reports rearm required, and teach the skill to give backend-agnostic rearm guidance without screenshot or vision fallbacks.
2026-05-10 00:05:08 +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
09d9ed2e80 Bound browser tab usage during research 2026-05-09 17:36:15 +02:00
Alessandro
ef98275c8c Improve final onboarding CLI connector hint
Tighten the final onboarding discovery cards so the setup suggestions take less vertical space.

Add a compact CLI Connector card with macOS/Linux and Windows install commands plus a small A0 terminal preview asset.
2026-05-09 16:47:52 +02:00
Alessandro
0a8aaee9ac Add host browser profile mode setting
Default Bring Your Own Browser mode to the existing browser profile while exposing a clean Agent profile option in Browser settings with a clear warning for existing-profile access.

Forward the selected profile mode through the connector browser runtime, tolerate legacy config modules and old saved configs, and update regression coverage for the new payload shape.
2026-05-09 16:25:27 +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
f6bc52201d Redesign first-run onboarding
Introduce a guided Cloud versus Local first-run modal with provider selection, account connection, model picking, and a ready state.\n\nAdd the reusable discovery auto-modal trigger, chat-created startup checks, onboarding-owned provider presentation metadata and assets, OAuth affordances, local provider guidance, and model-search hardening.\n\nKeep runtime provider data centralized while preserving onboarding-specific copy, logos, and docs links in the onboarding plugin.

Update onboarding.html

Update onboarding.html
2026-05-09 07:46:36 +02:00
Alessandro
44d5e1ccf7 Persist browser history screenshots
Save a static JPEG for each Browser tool call in the chat history folder and render that immutable image in transcript screenshot previews. Keep live Browser surface attachment available through stored browser/context metadata, and ignore generated Playwright CLI artifacts.
2026-05-08 19:24:44 +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
a3d41e2ca1 Split A0 remote workflow skills by affordance
Replace the combined A0 CLI remote workflow skill with separate text-editor and code-execution remote skills, update tool stubs to load the matching per-tool guide, and keep computer-use remote scoped to desktop control. Add prompt-gating coverage for the per-affordance skill split.
2026-05-08 18:53:37 +02:00
Alessandro
229de5166b Expose Browser runtime selection to CLI
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 a protected connector endpoint for reading and updating the Browser plugin runtime backend so the A0 CLI can switch between Docker browser and Bring Your Own Browser mode. Keep legacy host_when_available values normalized to host_required, move the host/container setting to the top of Browser settings, and cover the config normalization path.
2026-05-08 18:37:46 +02:00
Alessandro
001c7e2ccb Simplify Host Browser config
Remove the ambiguous Use host when ready option from the Browser plugin settings and present the host-required path as Bring Your Own Browser. Add concise Chrome/Chromium remote-debugging guidance, normalize legacy host_when_available values to the BYOB setting, and make missing host-browser connector setup a repairable error with regression coverage.
2026-05-08 18:18:03 +02:00
Alessandro
aa7944b95a Centralize Browser helper contracts
Move URL normalization into Agent Zero-owned Browser helper code and expose the content helper's required API contract from the shared asset. Normalize host-browser open/navigate payloads before they cross into the connector, including nested multi actions, and add regression coverage for helper payload delivery and URL edge cases.
2026-05-08 16:39:04 +02:00
Alessandro
c020f1af28 Send browser helper source to host connector
Make the Browser plugin the source of truth for browser-page-content.js by attaching its source and sha256 to host-browser operations when the CLI has no matching helper hash. Store the helper hash in connector metadata and cover the routing/ensure path in tests.
2026-05-08 15:23:44 +02:00
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