Commit graph

349 commits

Author SHA1 Message Date
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
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
e92e518ab2 Refine right canvas rail controls
Move the right canvas rail into a centered floating socket in both open and closed states so chat space is preserved and the canvas content keeps the full panel width.

Add a dedicated dock-style show/hide control, make surface buttons select surfaces without hiding the canvas, remove the header close button, and align the diff viewer header padding with shared spacing tokens.

Update right-canvas.css
2026-04-27 00:53:56 +02:00
Alessandro
10e8f5d01a canvas + browser CSS polish 2026-04-27 00:16:58 +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
56a42b97d7 Make agent profiles context scoped
Persist the active agent profile with each chat context and add a context-scoped endpoint for switching profiles without mutating global settings. Update the WebUI selector and docs to treat settings as the default for new chats, and expose the switch through the A0 connector plugin.
2026-04-26 22:27:35 +02:00
Alessandro
c32e328287 Polish Browser settings and viewport handling
Add Browser settings for the default starting page and tool-result autofocus, and wire them through config, APIs, runtime opens, and the settings UI.

Resolve Chrome extension __MSG_* manifest labels from locale metadata so installed extensions show readable names. Stabilize Browser viewport negotiation across canvas and modal surfaces by clearing stale frames, waiting for stable surface dimensions, and forcing sync after dock transitions. Move Browser loading/error state into a thin bottom status bar so it no longer overlays the page viewport.
2026-04-26 21:47:50 +02:00
Alessandro
f1b014feb3 Automatic canvas handoffs
- Auto-open Office and Browser canvas surfaces from fresh tool results, including history/result messages.
- Preserve Browser target IDs when focusing a canvas session from tool output.
- Convert substantial response-style artifacts into Office documents at runtime, without relying only on prompt compliance.
- Attach Office artifact metadata to the completed response log so the canvas opens without leaving a dangling Processing group.
- Polish Office UX by removing the inactive version-history action, showing only the healthy dot, and improving Collabora blank-load recovery with browser state cleanup.
- Deduplicate auto-open events and ignore stale results.
2026-04-26 19:32:50 +02:00
Alessandro
370ac9b878 Make Browser dockable and stabilize canvas interaction
Extend Browser into a reusable panel that can run in either the Universal Canvas or the floating modal. Add canvas registration, dock/undock behavior, and keep the existing modal path working as a fallback.

Stabilize tab switching with viewer tokens and stale-frame rejection, prevent command snapshots from crossing active tabs, and keep tab changes responsive.

Improve canvas navigation and scrolling by making screencast polling non-blocking and removing page-settle waits from wheel input, so the visible frame updates promptly without stretch/catch-up artifacts.

Polish Browser busy feedback with a spinner-only status affordance to avoid misleading “updating browser” copy.
2026-04-26 17:09:21 +02:00
Alessandro
bf02987d57 Add Office Collabora canvas integration 2026-04-26 12:57:26 +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
603fc2064b improve computer-use screenshot refresh guidance
Add post-action settle/fresh-capture handling for computer_use_remote, include capture ids and coordinate-space summaries in screenshot attachments, and tighten prompt guidance so agents use the latest capture without assuming semantic/window targeting.
2026-04-24 14:27:11 +02:00
Alessandro
9cfba12b36 skills: add structured flow for agent profile creation
Update the a0-create-agent skill to draft a temporary AgentProfileBlueprint JSON before writing the actual agent.yaml and prompt files.

- document built-in profile patterns and common prompt override levers
- add structured intake questions for scope, behavior, workflow, and output format
- define a temporary agent_zero.agent_profile_blueprint.v1 planning object
- keep agent.yaml as the required profile definition file
- call out root /prompts overrides for response contracts and advanced behavior
- update the profile-creator starter prompt to request the blueprint flow
2026-04-22 14:26:10 +02:00
Alessandro
539d809789 feat: add agent profile switcher to chat composer
Surface the active Agent Profile beside the model preset switcher and let users switch profiles through the existing settings flow.

- add agent profile metadata to state snapshots
- list available profiles in the chat composer profile dropdown
- persist profile changes via settings_get/settings_set
- add a Create new Agent Profile action that opens a guided a0-create-agent chat
- rename the agent-profile creation skill/docs from a0-new-agent to a0-create-agent
- clean up fetchApi imports for related WebUI modules
2026-04-22 14:25:18 +02:00
Alessandro
15c4303f69 Guide computer-use agents away from pointer clicks
Update computer_use_remote prompts to prioritize accessibility, semantic UI paths,
hotkeys, focus traversal, typing, and keyboard scrolling before pointer actions.

Clarify that scroll is the preferred non-click fallback for viewport movement when
keyboard scrolling cannot target the active pane, while move/click remain explicit
last-resort actions. Add a regression test covering remote scroll delta forwarding
and automatic screenshot refresh behavior.
2026-04-22 14:25:18 +02:00
Alessandro
1993f6f864 Store vision and computer-use images as path refs
Keep image payloads out of persistent agent history by storing vision and
computer-use captures as file path references instead of inline base64 data.

- update vision_load to attach image paths without compression or JPEG conversion
- update computer_use_remote to attach shared capture artifact paths directly
- serialize local image refs into provider-valid data URLs only at request prep
- reject base64/data URL attachments on the connector WebSocket path
- advertise path_or_url as the connector attachment mode
2026-04-21 18:18:59 +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
8b8fecdef1 show active plugin name in settings modal; clean browser_agent actions
- Populate plugin settings modal title from selected plugin metadata instead of static `"Plugin Settings"`.
  - Keep the modal title aligned with the currently opened plugin (`display_name`/`name` fallback).
  - Remove the non-functional **Open Model Settings** action from `_browser_agent` UI.
  - Remove the now-unused `openModelSettings()` handler from `browser-agent-store`.
  - Preserve and retain only **Open Presets** and **Open API Keys** in Browser Agent actions.
2026-04-21 06:22:13 +02:00
Alessandro
3ded188542 Add Plugin Hub "New" filter for recent plugins
- Add recency-based New filter to plugin hub browsing, showing plugins updated in the last 14 days
  - Add "Newest" sort option and New badge/filter chip styling in browse cards
  - Auto-switch to newest sorting when New filter is selected
2026-04-21 06:15:29 +02:00
Alessandro
cc05ece827 ui: show model API keys in main model settings form
Move API key input fields out of the collapsed Advanced Settings section in model field UI so keys are always visible when configuring chat/utility/embedding models. Keep existing API key behaviors (visibility toggle, reveal-on-show, dirty-state tracking, and persistence flow) unchanged while removing the extra click required to access keys.
2026-04-21 06:10:40 +02:00
Alessandro
e2c5f59754 fix integration config UI persistence for Telegram + WhatsApp
Align integration config UX/saving behavior and project binding.

- Telegram integration: keep Save available when appropriate in the wizard footer
  so config changes (including deleting bots) can be persisted reliably.
- WhatsApp integration: fix project dropdown binding by using normalized
  key/value helpers (supports both `key/label` and `name/title` payloads) and
  showing project labels correctly.
- Mirror both fixes into the runtime plugin copy under agentdocker so the
  running container gets the update immediately.

This resolves user-reported integration setup issues and restores expected
save/delete behavior.
2026-04-21 06:01:36 +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
20107ff921 Compress computer-use captures before embedding in history
Reduce the size of computer-use capture attachments stored by the
_a0_connector plugin so Windows screenshots remain usable.

- optimize capture images before embedding them in history
- convert large captures to JPEG data URLs instead of keeping full PNG payloads
- keep the existing capture-path fallback when inline payloads are missing
- preserve the current user-facing computer_use_remote flow while shrinking the
  history payload
2026-04-20 03:56:49 +02:00
Alessandro
d28c21e1a0 connector: block shell write actions inread-only mode
When code execution remote was enabled but CLI was in read-only mode, the shell could still write files to disk.
2026-04-20 03:07:42 +02:00
Alessandro
a5d733c85f connector: gate remote tool guidance on active permissions
Move the heavy remote-tool operating guidance out of the always-on tool prompts
and inject it only when the current context can actually use those tools.

- add extras prompts for computer_use_remote, code_execution_remote, and text_editor_remote
- trim the base tool prompts down to the stable contract and minimal notes
- inject detailed guidance from message-loop extensions instead of always paying the token cost
- store remote_files and remote_exec hello metadata alongside computer_use metadata
- make code_execution_remote follow the real F4 exec-enabled state
- make text_editor_remote follow the real F3 read-only vs read-write state
- surface read-only mode in the injected text-editor guidance and suppress write guidance there
- keep legacy fallback behavior for older CLIs that do not yet advertise the new hello metadata
2026-04-19 22:06:13 +02:00
Alessandro
bdf9cad447 add backend-aware computer-use and inline capture support
- extend `_a0_connector` computer-use metadata handling to retain
  `backend_id`, `backend_family`, `features`, and `support_reason` from the
  CLI hello payload
- update `computer_use_remote` to prefer inline `png_base64` screenshots for
  capture and auto-refresh flows, while keeping filesystem-path fallback for
  migration/debug cases
- include backend information in status formatting so remote computer-use
  sessions are easier to inspect across Wayland and Windows backends
- align the builtin Agent Zero plugin with the new multi-backend computer-use
  transport used by `a0` 1.5
- replaced heavy CU instructions with a SKILL.md
2026-04-19 18:50:14 +02:00
Alessandro
f86d1c555c add connector stale-read protection to remote patching
Add _text_editor-style freshness checks to the _a0_connector remote text editor flow.

- add local freshness helpers for remote file metadata and patch-state tracking
- require a prior read or write before allowing remote patch operations
- run remote patches through stat -> stale check -> patch using private websocket plumbing
- store freshness state in agent.data keyed by CLI-reported realpath
- reuse fw.text_editor patch_need_read and patch_stale_read prompt behavior
- refresh stored state after line-preserving patches and mark it stale after insert/delete or line-count changes
- return a clear compatibility error when the connected CLI does not support internal stat

This keeps the existing edits schema and human-facing success messages unchanged, and does not change remote tree publishing behavior.

Bump plugin version to match CLI Connector.
2026-04-16 15:21:01 +02:00
Alessandro
9db0edd89a Send connector exec config in ws hello
## Summary
- include `exec_config` in `_a0_connector` `connector_hello`
- source execution timeouts and prompt/dialog patterns from `_code_execution` config
- make the connector advertise execution policy explicitly to the CLI

## Why
The CLI should not depend on a local Agent Zero Core checkout just to run `code_execution_remote`. On Windows this broke remote execution even when the connector was active, because the CLI could not see the container's internal Core tree. The backend already owns the execution policy, so it should send that contract directly.

## What changed
- add `_a0_connector.helpers.exec_config.build_exec_config()`
- read `_code_execution` settings/defaults through plugin config resolution
- return `exec_config` from `_a0_connector.api.ws_connector` during `connector_hello`

## Impact
- removes an implicit host-side Core dependency from the connector flow
- lets the CLI keep only platform-specific shell / TTY behavior locally
- aligns Linux and Windows behavior behind the same handshake contract
2026-04-16 15:21:01 +02:00
Alessandro
1d8bc2b2c5 fix compaction in a0_connector plugin 2026-04-16 15:21:01 +02:00
Alessandro
5479cded95 Merge branch 'main' into ready 2026-04-12 17:27:51 +02:00
Silver Zachara
f5e21b9871
Fix typos in memory.solutions_sum.sys.md 2026-04-12 16:34:16 +02:00