Commit Graph
107 Commits
Author SHA1 Message Date
Alessandro Frau 2b0b3a416d Add host workspace tree settings with container inheritance
Add Host workspace controls to Agent Settings > Workdir. Inherit the current
container workdir's four tree limits by default, or persist independent remote
limits when inheritance is disabled. Validate non-negative whole numbers and
preserve zero as unlimited without changing host access permissions.

Include effective remote_tree_config in connector hello and tree
acknowledgements so updated CLI and Launcher gateway sessions refresh their
maps without reconnecting. Older connectors remain compatible.

Document the settings and protocol behavior and add inheritance and validation
coverage. Verification: 109 focused Core tests passed; desktop/mobile UI,
Save/Cancel, persistence, and live gateway refresh checks passed. The full Core
suite was not run.
2026-11-17 15:28:13 +01:00
Alessandro e4d1905fb3 Clarify default remote input access
Clarify that input_remote and remote terminal execution are already enabled
by default and require no Agent Editor grants. Update the tool prompt,
host execution skill, and policy documentation to distinguish this default
from custom profiles that restrict terminal access.

Add regressions covering prompt and native-schema visibility, policy
checks, and dispatch without explicit grants under inherited and custom
allow-by-default policies. Keep terminal dependency enforcement and host
execution and Read&Write gates unchanged.

Validation:
- 192 focused tests passed in both Conda a0 and Docker's framework runtime.
- Live runtime policy checks confirmed input, input_remote, and remote
  execution are allowed for the default and agent0 profiles.
- No new end-to-end CLI session was run.
2026-11-12 17:39:18 +01:00
Alessandro 25542e9950 Require remote terminal permission for input_remote
input_remote forwards keyboard text as terminal code, allowing a custom
profile to bypass a blocked code_execution_remote capability through an
independently enabled input tool.

Require the canonical bundled remote terminal action in shared policy
resolution while retaining input_remote's independent permission. Apply
the dependency to execution, text prompts, and native tool schemas, and
recheck it inside the input wrapper before rewriting args or dispatching.
Output-only grants, default-deny policies, and profile tool-name overrides
cannot authorize the terminal operation.

Document the permission dependency and add 19 regressions covering zero
dispatch on denial, action-specific grants, prompt/schema visibility,
authorized input, host access controls, and framework-owned allow_running.

Validation: 232 focused tests passed in both Conda a0 and Docker's framework
runtime. A smoke test through the real CLI shell backend verified denied
dispatch, authorized idle and interactive input, and permission revocation.
Restarted the live Agent Zero runtime and verified HTTP health.
2026-11-01 07:49:29 +01:00
Alessandro 7d821c46f5 Add chat message search to the Connector API
Accept an optional query on the protected chats_list route to search loaded chat titles and message logs. Reuse the bundled sidebar search helper for bounded, Unicode-safe literal highlight parts while keeping the normal list response unchanged.

Validate request and query types and limit queries to 200 characters. Blank queries skip scanning. Document the API contract and cover unchanged listing, authentication, validation, and excerpts.

Validation: 29 Core API and shared search-helper tests passed in the live Docker framework. Verified the live CLI client against 400 loaded conversations. Whitespace checks passed.
2026-10-31 03:36:51 +01:00
Alessandro Frau 31ceafa2c1 Merge pull request #1966 from linkliti/feat/promote-plugins-v2
feat: Tool improvements
2026-10-27 18:24:19 +01:00
Alessandro dc34830447 fix: preserve compatibility across tool plugin refactor
Initialize the scheduler store before snapshots. Preserve legacy memory calls and per-action permissions while advertising the unified tool, and retain saved policy IDs for moved tools. Restore legacy log rendering and connector tool events, and reject malformed boolean arguments by default.
2026-10-27 17:33:33 +01:00
Alessandro 84b502f6f3 Expose scoped plugin composer controls to connectors
Add a capability-gated, session-authenticated and CSRF-protected list/set API using the existing agent-scoped extension dispatcher. Plugins own descriptors, domain validation, revision checks and persistence; the connector backend has no optional-plugin adapters or arbitrary URL/code dispatch.

Document the extension and transport contract and cover independent controls, scoped availability, input validation and unchanged error responses. Validation: 21 focused Core tests passed; the live endpoint rejects missing CSRF and discovers the optional plugin control.
2026-10-24 18:37:22 +02:00
linkliti 4c6fc936ac feat(connector): render computer use remote through a dedicated badge
The computer use remote tool logs its messages as a dedicated computer_use_remote type with an icon verb headline naming the action, and a plugin message handler renders them as DSK badges in their own lilac accent shared with the agent-to-agent badge, with arguments passed through. Regression tests cover the log entries and headlines.

Validation: pytest tests/test_a0_connector_computer_use_tool_ui.py
2026-10-21 23:37:32 +03:00
linkliti 8fbcbdbc00 refactor(tools): unify boolean argument coercion in helpers.tool
Centralize boolean argument coercion in helpers.tool and route the promoted and core tools through it. This removes the duplicated private coercion helpers, including one in the remote code execution tool, along with the repairable-error messages and prompt files that only the strict boolean validation used. Strict boolean argument validation gives way to the shared coercion, which maps common true/false strings and falls back to truthiness, so invalid reset and dedicated_context values stop returning repairable errors. Browser regression tests now import the real modules before installing their stubs.

Validation: pytest tests/test_tool_action_contracts.py tests/test_browser_agent_regressions.py
2026-10-21 19:04:33 +03:00
Alessandro 4dceb49211 fix(computer-use): start host sessions on the first action
Start a missing chat session and resume the requested desktop action within
the same tool call. Limit recovery to one session-required response on the
same host and context, preserving approval checks and explicit session IDs.

Update host prompts to begin with an observation and add Linux X11/XWayland
guidance for verified focus, viewer scaling, popup handling, slow input,
and visual verification. Keep the internal Docker/Xpra desktop separate.

Validation: 26 Core prompt/metadata checks passed locally and in the live
framework environment; 42 focused connector tool tests passed. Native GUI
acceptance was not rerun because host Computer Use was disabled.
2026-10-02 18:03:32 +02:00
Alessandro a2dc9dc8d7 Align remote execution and Computer Use tool contracts
Expose input_remote as a thin facade over the existing gated execution path,
matching local input and sharing connection, permission, timeout, transfer,
and disconnect handling. Remove runtime=input without a compatibility alias.
Keep native execution/input schemas aligned and session follow-ups sequential.

Keep Computer Use arguments concise and place scoped macOS targeting guidance
in its backend skill behind the advertised capability. Remove the ineffective
mode argument from model-facing guidance and refresh prompt contract coverage.

Validation: 128 focused Core checks passed. Live Docker framework checks covered
tool discovery, prompt rendering, disconnected gating, and removed-runtime
rejection. Native macOS desktop actions were not verified on this Linux host.
2026-09-12 18:24:54 +02:00
linkliti bd06096a3d Document remaining tool arguments in prompts and DOX
Add model-facing tool arguments found by a manual audit: call_subordinate name, office_artifact sheet plus edit count and preview_chars, browser skill value, paths, ref, keys, and selectors, and computer_use_remote include_hidden, include_offscreen, max_windows, mode, target, value, and path. Keep prompts canonical-only and record legacy aliases and action-value spellings in the owning DOX files for browser, a0_connector, office, text_editor, code_execution, goal, call_subordinate, and parallel.

Verified the argument flows against tool source in three independent manual audit passes covering core tools, plugin tools, helpers, and WebUI handlers. Verified prompt catalog and plugin scan tests in the framework runtime and kept the mirrored core instance in sync for live testing.
2026-09-10 17:00:19 +03:00
linkliti 60c6a7fed2 Keep browser runtime state out of the system prompt
Move the browser context extension from system_prompt to message_loop_prompts_after and write open-tab listing and last-interacted page content into loop extras so the system prompt stays cache-stable across turns. Preserve the profile tool-policy gate before any runtime access.

Minify browser tool JSON in agent history and keep JSON beautification plugin-local in the WebUI tool handler for display only while copy, speak, and result parsing stay on the raw text. Document missing tool arguments in the browser skill and the call_subordinate, code_execution_remote, computer_use_remote, and office_artifact prompts, and update Browser plugin DOX contracts.

Add focused browser tool output tests and update tool policy coverage for the moved extension. Verified 33 targeted tests in the framework runtime and a live evaluate, extras injection, and minified history check on the mirrored core instance.
2026-09-10 15:20:37 +03:00
Alessandro cb7e9b48d5 Centralize streamed file transfers and harden archive operations
Route Files uploads, downloads and Editor writes through shared bounded I/O,
atomic publication and owned temporary-file cleanup. Use native download
responses with single-use tickets and recheck remote connection permissions.
Keep general API exception handling unchanged and map file errors locally.

Add independent archive expansion and entry budgets, reject unsafe members,
and align all provider calls with the new streaming interface. Reuse existing
file helpers, remove prototype connection migration, and preserve container-root
access while treating connected host roots as separate boundaries.

Validation: 145 focused Core tests passed. Earlier live checks covered native
browser transfers, ZIP extraction, Editor conflicts and a CLI roundtrip above
100 MiB with its configured limit raised. The five new provider plugins require
the matching streaming updates in their separate repositories.
2026-09-09 01:40:04 +02:00
Alessandro 4777c14d82 Expose connected CLI and Launcher folders in Files
Discover live host folders through existing Connector routing and bind each entry to its connection and exposed root. Respect host permissions, reject stale sessions and leave scope configuration in the CLI or Launcher.

Move host file bytes over authenticated HTTP with request-scoped receipts, size and SHA-256 checks, temporary-file cleanup and atomic publication. Honor Core size settings without a separate host HTTP ceiling.

Cancel pending transfers synchronously during context shutdown and send best-effort abort notices. Add tests for discovery, routing, permissions, receipt cleanup and cancellation.
2026-09-08 23:07:39 +02:00
Alessandro 9e0c44b984 Merge websocket transport hardening
Integrate negotiated payload limits, bounded chunked operations, transfer cleanup, and atomic HTTP file transfers. Preserve the current UI bundling, download scope, and Connector behavior while resolving branch conflicts.

Validation: 120 focused Core checks passed against a clean merged-source snapshot. Current File Browser edits are preserved in a separate stash for restoration.
2026-09-08 21:33:42 +02:00
Alessandro 03c9d8ccd5 Hide remote skill discovery until the A0 CLI connects
Gate the connector skills root using current connection metadata so listing, search, loading, and recall stop exposing host skills after disconnect. Preserve cached paths and existing per-capability tool gates.

Move setup-a0-cli into the primary skills directory so connection guidance remains available offline. Move detailed host-browser instructions into the browser workflow skill to remove remote tool references from the default system prompt.

Validation: 110 targeted checks passed in a clean source snapshot; strengthened disconnected-prompt assertions passed. Verified real CLI attach and disconnect in the same chat at localhost:32081, plus native schema gating in the container framework runtime.
2026-09-07 14:43:04 +02:00
Alessandro 6f0f036fea Share editor log presentation across local and remote tools
Move the duplicated editor log builder into the existing text-editor helper boundary while preserving headings, remote markers, log routing and tool identity. Correct the documentation that confused plugin activation with availability of shipped Python dependencies.

Verified with 100 editor, action and policy tests, six final log checks, and a framework local/remote log probe with plugin discovery disabled. File operations and connector routing are unchanged.
2026-09-06 20:35:27 +02:00
linkliti 296c7095ea Polish DOX prose to match frdel imperative-contract pattern
Diary verbs and packed bullets in AGENTS.md updates converted to imperative contracts and parallel ownership lines matching e138e33c baseline.
2026-09-04 15:09:34 +03:00
linkliti d1907bcd41 Add text_editor custom message handler and CSS
Override get_log_object in TextEditor and TextEditorRemote to log type=text_editor so the WebUI get_message_handler extension routes to _10_text_editor_handler.js. Move EXE colors out of core process-group.css into the _code_execution plugin. Hides _tool_name from display and uses dynamic action+path headings (remote adds (remote) suffix). Behavioral tests instantiate the tools and assert log item attrs.
2026-09-03 15:08:59 +03:00
TerminallyLazy 37093f5888 Bound attachment metadata percent decoding 2026-08-12 14:34:15 +02:00
TerminallyLazy efdb5f4aca Strip encoded attachment metadata delimiters 2026-08-12 14:34:15 +02:00
TerminallyLazy e9d5274064 Fix attachment replay metadata sanitization 2026-08-12 14:34:15 +02:00
TerminallyLazy 921a390c14 Task 1: Preserve Sanitized WebSocket Attachment Names in Replay Metadata 2026-08-12 14:34:15 +02:00
Alessandro 9dab4f2460 Hide the utility agent from profile selectors
Centralize omission of the internal default profile in the shared presentation catalog and keep status reporting intact for existing chats. Align Settings, model-switcher, Connector, Telegram, and selector contracts with focused regressions.
2026-08-12 14:34:15 +02:00
Alessandro 2a2890d892 Add reusable agent profile commands
Expose sparse Easy-mode profile creation through the Agent Editor and Connector API capability, while preserving existing profile selection behavior.

Reuse /profile in the WebUI for management and fast creation, then open a fresh chat with the new profile in the selected project scope. Add focused backend, command, and WebUI regressions for the shared flow.
2026-08-12 14:34:15 +02:00
Alessandro afff2e3c05 Harden scoped tool policy enforcement
Resolve effective policy through inherited layers without letting empty upper configs shadow restrictions, and carry canonical tool identities through local and MCP execution.

Enforce required policy hooks and parent delegation checks at runtime, keep installed connector capabilities configurable while disconnected, and remove complete blocked-tool examples from rendered prompts.

Use the canonical tool prompts for concise catalog descriptions and add regressions for plugin activation, dotted local names, MCP calls, layered policies, and parallel subordinate paths.
2026-08-12 14:34:15 +02:00
Alessandro eec18ad839 Enforce scoped tool access policies
Add one project/profile-aware resolver for canonical local, plugin, and MCP tool identities.

Apply it to text prompts, Responses schemas, connector stubs, local execution, MCP invocation, and delegated agents while preserving the response and vision invariants owned by the runtime.
2026-08-12 14:34:15 +02:00
Alessandro 84da8420d2 Refine A0 CLI setup guidance
Keep setup conversations brief and progressive so agents ask only for the next required detail.

Require the user’s exact Agent Zero URL instead of suggesting a common or default port.
2026-07-28 16:46:38 +02:00
Alessandro 697f3ea476 Document connector payload contracts
Record the negotiated WebSocket ceiling, bounded transfer state machine, cancellation lifecycle, and remote text limits in the owning Core DOX scopes. Keep authenticated HTTP as the documented bulk-data plane.
2026-07-27 10:15:24 +02:00
Alessandro 76f905e07a Bound remote connector tool payloads
Treat remote text and terminal output as bounded control-plane data, with explicit continuation or spill metadata for larger content. Reject oversized inline browser and Computer Use artifacts before base64 expansion and direct bulk files to authenticated HTTP transfer paths.
2026-07-27 10:15:15 +02:00
Alessandro 828f919010 Harden Core connector transport
Enforce negotiated WebSocket ceilings before serialization can disconnect a peer, and add the symmetric checksummed transfer protocol for eligible large operations. Bound transfer state, spool large payloads to disk, and cancel active work on pause, reset, delete, or disconnect.
2026-07-27 10:14:52 +02:00
Alessandro 4cea5d7197 Harden remote Linux computer use targeting
Require verified window focus before target-bound typing and report remote computer-use receipts from observed evidence.\n\nGuide agents through scoped snapshots and focus verification while refusing window presses and identical failed-action retries.
2026-07-26 00:24:05 +02:00
Alessandro 1831c7b47e feat(connector): page tail history snapshots
Serve a bounded tail snapshot and cursor-based older pages for interactive clients. Preserve complete replay for clients that do not request history hints.
2026-07-23 03:43:44 +02:00
Alessandro 4b0c575f01 Remove Launcher Host access controls from Core
Delete the Core WebUI gateway menu and its client-side control store so Host access stays owned by A0 Launcher. Keep /computer-use informational in WebUI and direct users to Launcher or A0 CLI for host changes.
2026-07-17 15:59:30 +02:00
Alessandro 02e1a98604 Apply Launcher scope changes before routing
Update remote file and execution metadata from the acknowledged Launcher gateway state before resolving the control request.

Add regression coverage for the read/write to read-only transition so writes fail immediately while reads remain routed.
2026-07-17 15:20:33 +02:00
frdel 15a2b553be Unify global model presets
Make model presets a single global collection and treat presets as reusable setups (main, utility, embedding). Persisted scope configs now store only a preset name (Default is always present and immutable); project-scoped preset definitions were removed and attempts to edit/reset project presets are rejected. Add embedding-model support throughout: include embedding slot in presets, surface embedding in the switcher and override APIs, and notify extensions when the effective embedding model changes. Implement rename/retire propagation to update plugin configs, saved chats, and live AgentContext objects when preset names change or presets are removed. Update CLI/integration commands to use an "inherit" action for returning to the scoped preset and to report the effective scoped-or-chat preset. Add startup migration/bootstrap to initialize presets from remote or bundled fallback and numerous docs/UI text updates to reflect the new preset model. Extra: refactor config resolution helpers and add safety checks (validation, atomic writes) when saving presets.
2026-07-17 12:16:10 +02:00
Alessandro cfd0df4a62 Open Launcher Host access from Core
Show a direct Open Host access action when Launcher settings disable the gateway while preserving Reconnect for Core-originated disconnects.

Use the bounded Launcher bridge so Core opens the trusted settings editor instead of re-enabling access itself.
2026-07-16 13:37:42 +02:00
Alessandro 38a5945441 Route Computer Use approval through Launcher
Make /computer-use on and off act on the current Launcher Host access lease while preserving A0 CLI guidance in ordinary WebUI sessions.

Update connector prompts and regressions so permission recovery consistently accounts for both Launcher and CLI entry points.
2026-07-16 13:26:13 +02:00
Alessandro 3c23b9b94e Turn Launcher host Disconnect into Reconnect
Keep the Core host popover open after a hard disconnect and reuse the connection action to restart the owning Launcher tab lease.

Retain the master toggle as the reversible Pause control and cover the bounded bridge contract.
2026-07-16 04:42:01 +02:00
Alessandro e2fd320ac6 Polish Launcher host access popover
Use the standard compact panel radius and present the emergency gateway action as Disconnect. Keep the plugin contract and focused UI regression coverage aligned.
2026-07-15 15:29:33 +02:00
Alessandro 8fed806a1f Integrate Launcher hosts into sync status
Move the Launcher Host access control into Agent Zero's existing sync-status cluster, render one computer glyph per gateway, and remove the tooltip, expanding label, and animation. Reuse the standard WebUI radius tokens and cover the new extension surface and compact indicator contract with focused tests and DOX updates.
2026-07-15 14:38:01 +02:00
Alessandro b11a57424e Split Launcher host file permissions
Advertise the file-write gateway capability while preserving legacy Files scopes as read/write access.

Render five Host access switches in Core, enforce read/write/exec dependencies, and cover negotiation and control behavior with focused tests.
2026-07-15 14:12:19 +02:00
Alessandro 3271ff43e3 Report Host access control failures
Use Agent Zero's shared notification system when Launcher gateway mutations fail, then refresh the popover state as before.
2026-07-14 22:43:52 +02:00
Alessandro df6065d5b1 Polish Launcher host access controls
Keep the Core trigger compact until hover, focus, or open, and use the supported computer glyph for disconnected state. Raise the open popover above the compact Canvas rail so its controls remain unobstructed.
2026-07-14 21:27:09 +02:00
Alessandro dafe5a33ba Add Launcher host gateway protocol support
Advertise and route a single Launcher gateway, expose acknowledged controls, and add the Launcher-only host status UI with regression coverage.
2026-07-14 17:19:48 +02:00
Alessandro 7298a88fda Add BYOB host browser selection
Add host_browser_selection config normalization, Browser Settings UI choices from CLI-advertised inventory, and browser_selection forwarding through connector browser operations.

Expose host browser ids, labels, and available_browsers through A0 connector metadata and the browser_runtime API, with regression coverage for selection normalization.
2026-07-04 18:33:58 +02:00
Alessandro 2615fb8e3f Reassemble chunked connector file results
Buffer JSON/base64 connector_file_op_result chunks per pending file operation and resolve only after the complete result is assembled.

Validate malformed chunk metadata with a pending-operation error, while preserving the existing single-payload behavior for small file operations.
2026-06-16 13:59:38 +02:00
Alessandro 2b99ab53c6 Gate remote tool prompts by connector metadata
Hide A0 connector remote tool prompts unless a connected CLI advertises the matching capability. Remote file access enables text_editor_remote, F4-enabled remote execution enables code_execution_remote, and supported enabled Computer Use that is not in rearm-required state enables computer_use_remote.

Apply the same gate to Responses API function-tool generation, move the prompt hook to the active tool-prompt extension path, and update connector prompt wording, DOX, and regression coverage.

Verified with:
- conda run -n a0 pytest tests/test_a0_connector_prompt_gating.py tests/test_default_prompt_budget.py tests/test_responses_architecture.py -q
2026-06-13 02:00:32 +02:00
frdel c576f67469 Merge branch 'ready' of https://github.com/agent0ai/agent-zero into ready 2026-06-08 12:41:57 +02:00