Commit graph

16 commits

Author SHA1 Message Date
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
ff828e294e Add plugin thumbnails 2026-04-28 15:04:19 +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
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
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
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
8c5cf1f69f add built-in A0 CLI Connector plugin
Introduce the builtin `_a0_connector` plugin that lets the host-side
A0 CLI connect to Agent Zero over authenticated HTTP and `/ws`.

This adds connector capability discovery, chat/context lifecycle
endpoints, log streaming, and the remote text editing, code execution,
and file tree bridge used by the CLI workflow.
2026-04-11 18:56:32 +02:00