Commit graph

495 commits

Author SHA1 Message Date
Alessandro
3ce418a9d5 Align Agent Editor toast action styling
Use the shared toast action row and primary button classes for the Test in new chat action. Remove the plugin-specific link styling and cover the shared markup in the focused WebUI regression test.
2026-08-12 14:34:16 +02:00
Alessandro
517a3cd90b Fix assistant-first provider history
Omit orphaned leading assistant messages from model history so Claude-compatible providers receive a user-first conversation.

Add regression coverage for the initial UI greeting path.
2026-08-12 14:34:16 +02:00
axelray-dev
01def8603a fix(oauth): send Codex client version header on upstream requests
Upstream gates newer models on a version header. Attach
resolve_codex_version() when non-empty so completions match /models.

Fixes #1765
2026-08-12 14:34:16 +02:00
gdeyoung
cb9c877538 fix(transport): fall back on untyped Responses items
Treat opaque 400 type-discrimination errors from OpenAI-compatible Responses endpoints as shape-specific request rejections and retry through Chat Completions. Add focused regression coverage.
2026-08-12 14:34:16 +02:00
King0James0
c42dffa54e feat: Time Travel shadow-repo retention (orphan cleanup, optional age-out, stale-lock repair)
Time Travel keeps a hidden git repository per workspace under
/a0/usr/.time_travel/workspaces/<id>/repo.git and snapshots on every file
change, but ships no retention: nothing deletes a shadow repository when its
chat or project is removed (chat_remove never touches .time_travel), there is
no delete/prune endpoint in the API or web UI, and a workspace whose 'git add'
ever exceeds GIT_TIMEOUT_SECONDS strands repo.git/index.lock, failing every
later snapshot with 'index.lock: File exists'. Observed on a live instance:
518 shadow repositories / 12 GB, most belonging to long-deleted chats, plus a
permanently wedged workspace.

This adds a throttled retention sweep driven from job_loop:

- Orphans: live workspace paths (project folders, the configured workdir,
  per-chat workdirs) are forward-enumerated and hashed with the existing
  workspace_id_for derivation; a shadow directory matching none of them is
  unreachable from the UI forever and is removed after a grace window.
- Optional age-out: retention_max_age_days (default 0 = keep forever) removes
  a live workspace's history when it has had no snapshot in N days. Time
  Travel lazily re-initializes an empty history on the next snapshot, so this
  is always safe for the feature.
- Stale locks: repo.git/index.lock older than retention_stale_lock_minutes is
  removed (git subprocesses are killed at GIT_TIMEOUT_SECONDS, so no
  legitimate lock lives that long), un-wedging future snapshots.
- Corrupt-repo set-asides (repo.git.invalid*) past the grace window.

Deletion is refused for any path outside the shadow root. Settings render in
the existing plugin-config pattern (default_config.yaml + webui/config.html,
settings_sections: agent): enable toggle, sweep interval, age-out days,
orphan grace, stale-lock age. Durable evidence lives next to the workspaces
dir: retention.json (running totals + last sweep stamp) and retention.log
(one JSON line per sweep naming everything removed, tail-capped at 1000).

Sweeps run in a worker thread off the event loop, at most one in flight,
default every 6 hours.

Tests: tests/test_time_travel_retention.py (config defaults/clamps, the full
sweep matrix, keep-forever default, disabled no-op, deletion guard, marker
accrual, per-sweep history + cap, throttle, and workspace_id_for parity).
2026-08-12 14:34:16 +02:00
Alessandro
d541a942b0 fix(api): align downloads with file browser root
Resolve individual and bulk download paths from the filesystem root so authenticated operators can download every path exposed by the File Browser and editor.\n\nKeep the existing authentication, CSRF, path normalization, and archive behavior, and cover downloads outside the Agent Zero runtime directory with a regression test.
2026-08-12 14:34:16 +02:00
Alessandro
b40874e7c0 Fix document query SSRF regression
Route remote document downloads through the existing public-only HTTP fetcher so direct and redirected non-public destinations are rejected while public redirects, request headers, proxy isolation, retries, timeouts, and size limits remain intact.

Add focused CVE-2026-4308 regression coverage for private targets and genuine public-fetch compatibility.
2026-08-12 14:34:16 +02:00
spinnakergit
d1e1c6494e fix(plugin-hub): preserve dirty edits during updates
Temporarily stash tracked plugin edits while updating. Restore the original checkout and edits if the update cannot reapply them, and surface the conflict beside the Update button. Add isolated Git regression coverage for merge, no-op, and conflict cases.
2026-08-12 14:34:16 +02:00
Alessandro
1121758a6f feat: add caller context to plugin config hooks 2026-08-12 14:34:16 +02:00
Alessandro
1b4505d8e5 Guard chat deletion against empty context IDs
Reject empty and whitespace-only chat context identifiers before provider or filesystem cleanup begins. This prevents malformed deletion requests from resolving to the shared chat directory and adds focused regression coverage.
2026-08-12 14:34:16 +02: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
db4913ff76 Avoid rewriting unrelated chats on project changes
Project updates and deletion previously persisted every loaded chat, while matching chats were written twice through the existing activation helpers.

Keep the established project lifecycle flow and remove the unconditional writes so only affected chats are saved once. Add focused regression coverage and document the persistence contract.
2026-08-12 14:34:15 +02:00
Alessandro
4f8ae9cc2c Keep hidden utility profile out of new chats
Normalize legacy global settings that still select the internal default profile to Agent 0. This keeps fresh chats aligned with the visible profile catalog while preserving existing chat selections.
2026-08-12 14:34:15 +02:00
Alessandro
282f13982b fix agent profile switching logic
Keep profile catalog reads lightweight by detecting sparse editor overrides without building removal plans for every agent.

Use the chat snapshot refresh as the single switch trigger and share concurrent same-context catalog requests while preserving newest-context-wins behavior.
2026-08-12 14:34:15 +02:00
Alessandro
14b5a03e7f Enhance native Kokoro voice blending
Bring the useful community enhancements into the built-in plugin with a current American voice catalog, speed controls, and in-memory weighted blending while preserving existing voice and speed configuration.

Reuse the singleton Kokoro pipeline, validate blend inputs, show resolved ratios in status views, and cover the native flow with focused regression tests.

Co-authored-by: twilso24 <122656888+twilso24@users.noreply.github.com>
2026-08-12 14:34:15 +02:00
Alessandro
864e311c60 Keep slash commands out of agent skills
Return skills only from skills_tool and remove the command-definition loading bridge. Leave slash-command discovery, invocation, and authoring with the Commands plugin and its user-facing surfaces.
2026-08-12 14:34:15 +02:00
Alessandro
b5006d571c Expose scoped plugin configuration indexes
Let project- or agent-scoped plugins open the shared settings surface even without a custom form. Tool Access can now reach existing scoped configurations while inert Save and Reset actions remain hidden.
2026-08-12 14:34:15 +02:00
Alessandro
dbe87ee184 Keep capability discovery aligned with runtime
Humanize MCP catalog labels with their server names while preserving canonical IDs. Suppress skill discovery prompts when skills_tool is unavailable and move the behaviour_adjustment prompt under the Memory plugin so disabling its implementation also removes its instructions.
2026-08-12 14:34:15 +02:00
Alessandro
c327701c83 Fix Agent Editor profile lifecycle state
Base reset visibility on the sparse removal plan, preserve unrelated profile files, and surface completion feedback without waiting for model-profile refreshes.

Keep saved preset controls and fresh-chat selection synchronized across global and project scopes, including the shared sidebar context race, with focused regressions and updated DOX.
2026-08-12 14:34:15 +02:00
Alessandro
13ecab24ee Unify Agent Editor capability and prompt controls
Give Tools, MCPs, and Skills explicit default switches with segmented per-item policy controls while preserving sparse overrides. Simplify Advanced prompt editing around the full-height ACE surface and align the editor contracts and regression coverage.
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
36672493ff Polish Agent Editor layouts and interactions
Refine the Advanced modal, prompt path display, review identity summary, reset-to-default workflow, and compact policy controls. Improve mobile footer and profile-card wrapping, make Advanced tool and skill rows directly selectable, and extend WebUI regression coverage for the updated behavior.
2026-08-12 14:34:15 +02:00
Alessandro
7b9f06771f Polish Agent Editor profile management
Add scoped restore for inherited profiles through the existing sparse removal path, and streamline Manage agents with separator rows and no redundant footer.

Remove redundant customization signals, use theme-primary colors for compact identity actions, simplify delegation guidance, and extend focused WebUI regressions.
2026-08-12 14:34:15 +02:00
Alessandro
b5ab1d5b8f Stabilize Agent Editor client workflows
Rebase new-agent drafts when scope changes, recompute Review paths, preserve authored creation metadata, and align client validation with backend prompt requirements.

Guard pending removals and stale manager transitions from discarding edits, let only the newest profile-catalog request own selector state, and hide stale rows during refresh.

Finish the themed, responsive Easy and Advanced presentation and exercise the real Alpine stores with controlled state and request-order regressions.
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
7545eef298 Harden scoped agent profile mutations
Validate destructive requests and project-derived scopes at the Agent Editor API boundary, and reuse the running-profile guard for deletion.

Recheck creation and availability invariants inside the existing mutation boundary, preserve project availability atomically through its dedicated owner, and keep Project Edit and Settings catalogs from replaying stale or unavailable profile state.

Add focused regressions for confirmation, collisions, malformed project metadata, avatar failures, running profiles, and sparse project updates.
2026-08-12 14:34:15 +02:00
Alessandro
9e5fd188e2 Finish scoped Agent Editor profile workflows
Add per-scope availability, duplication, active-profile status, and inline project selection while keeping the profile switcher synchronized with runtime state.

Reconcile unavailable profiles at explicit disable, deletion, project-transition, and context-creation boundaries; polish validation, prompt layout, deletion, and completion states; and extend focused backend and WebUI coverage.
2026-08-12 14:34:15 +02:00
Alessandro
027466c873 Add project-scoped Agent Editor profiles
Reuse the existing project/profile layers so Manage agents can switch between Global and project scope while sparse reads, writes, resets, and policy configs stay bound to the selected layer.

Make deletion scope-owned, preserve inherited profiles, and open Save & test chats in the exact selected scope.
2026-08-12 14:34:15 +02:00
Alessandro
457e92584f Polish Agent Editor workflows
Refine the Easy and Advanced surfaces with direct prompt editing, visible tool controls, compact transfer lists, per-row profile actions, and clearer review and removal states.

Reuse the shared compact model preset selector, improve responsive layouts and copy, and extend focused WebUI contracts for the polished behavior.
2026-08-12 14:34:15 +02:00
Alessandro
cf7fd3d566 Integrate Agent Editor into the WebUI
Add the Easy and Advanced editor modal, its single Alpine store, profile-switcher entry points and avatars, and the fresh-chat handoff after a successful save.

Restore focus across the shared modal stack and lock down the current interaction contracts as a stable baseline for the dedicated visual-polish phase.
2026-08-12 14:34:15 +02:00
Alessandro
32bf5889b0 Add deterministic sparse Agent Editor backend
Add dedicated Agent Editor APIs that read layered profile state and execute explicit change plans for metadata, prompts, model presets, tool policy, skill policy, and avatars.

Keep writes sparse and user-scoped, preserve unknown files and keys, avoid the destructive legacy save path and all model calls, and cover profile lifecycle, validation, provenance, and reset behavior.
2026-08-12 14:34:15 +02:00
Alessandro
c2ee867665 Add profile skill visibility policies
Extend _skills with sparse allow/block rules and an explicit default for future skills, using the existing layered plugin configuration and skill-entry normalization.

Enforce the policy across discovery, loading, and chat activation while preserving loaded history, legacy hidden-skill behavior, and canonical name/path identity.
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
641df22868 Make agent profile overrides presence-aware
Merge layered profile metadata by authored field presence so missing keys inherit while explicit empty values clear inherited values.

Move the default specifics prompt to the canonical prompts directory and cover sparse metadata and prompt-only overrides.
2026-08-12 14:34:15 +02:00
Alessandro
5ff106a2d4 Raise unusable response limit to five
Some checks failed
Build And Publish Docker Images / plan (push) Has been cancelled
Build And Publish Docker Images / build (push) Has been cancelled
Set the default consecutive unusable response threshold to five and align the Agent Settings copy, helper DOX, and regression assertion.
2026-08-01 16:52:48 +02:00
Alessandro
52421df9ec fix(webui): keep replayed warnings in process groups
Prefer cached process render metadata over mutable DOM-tail state when re-rendering warnings. Add focused regression coverage and document the replay contract.
2026-08-01 14:21:42 +02:00
Alessandro
2925baca8a Add file browser drag and drop
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
Move files and folders into directories or the parent path from the shared Files surface, with guarded multi-item backend moves and clear drop feedback.

Keep drag gestures independent from row selection, preserve unrelated selections after moves, and add focused regression coverage.
2026-08-01 12:50:31 +02:00
Alessandro
0c663403a3 Default chat-only providers to Chat Completions
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
Route Nebius, Z.AI, Z.AI Coding, and Gemini API OAuth directly through Chat Completions.

Avoid unsupported /responses probes and keep provider defaults aligned with documented upstream capabilities.
2026-07-31 18:17:31 +02:00
Alessandro
ff596e2a84 Require native Responses tool calls
Default Responses turns with Agent Zero function tools to a required, single native call while preserving explicit caller overrides.

Keep parallel work inside Agent Zero's parallel tool so complete tool roots reach the parser deterministically.
2026-07-31 16:35:53 +02:00
Alessandro
1d88a82b55 Fix native Responses tool metadata
Expose grouped memory tools and conditional vision support while applying prompt render variables before deriving native metadata.

Stop guessing complex schemas from prose and keep native descriptions to compact discovery text, reducing the duplicated Responses tool payload.
2026-07-31 16:35:53 +02:00
Alessandro
4b906561cd Remove obsolete preset API key warning
Stop scanning every global model preset for missing credentials when building Welcome banners. Keep readiness scoped to the effective model configuration so first-send setup remains in the deferred chat gate.

Add regression coverage for unused OpenRouter presets and document the boundary.
2026-07-31 16:35:53 +02:00
frdel
93d1131ce1 Unify WebUI icons and fix message collapsing
Introduce the x-icon custom element and migrate first-party WebUI and bundled plugin markup while retaining legacy Material icon compatibility. Defer icon-font readiness until the splash-installed document is parsed so Firefox does not leave icons transparent. Centralize chat message collapse handling, avoid false Show More controls on short user messages, and align grouped-message pagination styling. Update DOX and add regression coverage for the icon and collapse behavior.
2026-07-31 13:32:41 +00:00
frdel
bebe6826cf Improve WebUI bundling, manifest and stop command
Some checks failed
Build And Publish Docker Images / plan (push) Has been cancelled
Build And Publish Docker Images / build (push) Has been cancelled
Introduce a WebUI extension manifest and rewrite the asset bundler/server to support caller-supplied entry sets, extension-injected entries, and negotiated gzip. Key changes: add get_webui_extension_manifest() to helpers/extension, refactor Stop logic into stop_context() and reuse it from the connector `/stop` command, and add a new `/rename` slash command for chat naming. ui_bundler now accepts entry_urls, includes enabled extension entry files, raises the embedded text file size limit to 512 KiB, computes per-entry-set cache keys, and returns a bundle version based on the bundle signature. ui_server applies Starlette GZip middleware, adds routes (/, /index.html, /ui/index, /safe), serves splash/safe documents, injects the serialized webui_extension_manifest into the rendered index, and streamlines the /ui/asset-bundle endpoint with ETag and gzip handling. Also add multiple WebUI assets and fonts, new/updated plugin command YAML and Python command handlers, and corresponding tests covering bundling, commands, chat naming, and WebUI behaviors. Documentation (.dox.md) updated to reflect the new runtime contracts and guidance.
2026-07-29 19:49:07 +02:00
frdel
a01f765c40 Merge remote-tracking branch 'origin/ready' into ready 2026-07-29 06:19:44 +00:00
frdel
b6be345a56 Chat rendering/pagination, Add chat-naming and pin-to-top plugins
Refactor of messages.js to support lazy rendering.
Move chat rename functionality out of core and into a new _chat_naming plugin, and add a built-in _pin_to_top plugin for sidebar pinning. The chat-naming plugin includes API handlers, prompts, helper logic for selecting user messages and budgeted Utility Model calls, a python monologue_start extension, web UI (modal, store, config, sidebar action), and comprehensive tests. Removed the old core renaming extension and deprecated prompts/tests. Also added pin-to-top plugin files (API, helpers, webui store, tests/docs) and updated various AGENTS.md docs to reflect the new plugins and lifecycle clarifications. Minor UI/js tweak: reorder speak/copy buttons in browser tool handler and add a new webui message-window.js along with related webui/store/component updates and test adjustments.
2026-07-29 08:17:50 +02:00
Alessandro
4884e26a15 Add Codex response defaults to OAuth settings
Expose reasoning effort, reasoning summary, and answer verbosity in the Codex OAuth provider card, defaulting effort to high.\n\nNormalize provider settings and apply them to Responses requests without overriding explicit request values.
2026-07-28 16:46:38 +02:00