Commit graph

23 commits

Author SHA1 Message Date
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
a1c12e9247 Refine settings and remote access UX
Restyle Settings and standard modals around a streamlined left-rail layout, clearer section hierarchy, advanced settings disclosures, and stronger update states.

Add persistent update visibility with quieter once-daily update notifications, plus Remote Link and Space Agent actions in the canvas rail. Refresh the tunnel experience as a normal Remote Link modal with clearer copy, QR/mobile affordances, and safer state handling.
2026-04-27 02:48:23 +02:00
frdel
b7b9a55bb5 fix(update_check): initialize last_notification_id to None instead of empty string
Some checks failed
Build And Publish Docker Images / plan (push) Has been cancelled
Build And Publish Docker Images / build (push) Has been cancelled
2026-04-14 17:40:39 +02:00
Alessandro
954eca3563 add a0-setup-cli Skill and restore lexical trigger matching
Add a builtin `a0-setup-cli` skill for guiding host-side A0 connector setup,
and restore the lightweight trigger-word based skill matching flow, which many users asked for.

- add builtin `skills/a0-setup-cli/` with installer-first host setup guidance,
  container guardrails, fallback install paths, and example responses
- fix `helpers.skills_cli` so builtin skills under `/skills` are discoverable,
  searchable, and validatable
- restore trigger-pattern scoring in runtime `search_skills()`
- re-enable `skills_tool:search` in the current tool flow
- add lightweight lexical relevant-skill recall for the current user message
  without reintroducing memory/vector-db skill recall
- update skill prompts to steer the agent toward search/load when requests
  match skill trigger phrases
2026-04-11 18:03:05 +02:00
frdel
75b8085b65 Add unzip to Docker base packages, refactor API key handling, improve self-update system
- Add unzip package to Docker base installation
- Remove deprecated missing API key banner extension
- Refactor API key management: clear drafts on init, track dirty state, allow empty string saves
- Add version filtering to self-update: enforce minimum v0.9.9, validate tag format
- Improve self-update UI: convert howto to Bootstrap collapse, fix branch selector reactivity, group tag suggestions
- Fix settings
2026-03-24 17:17:19 +01:00
frdel
e680256b29 Refactor API key handling and update system improvements
- Refactor API key management: move from global env-only to per-model config with dotenv fallback
- Add API key placeholder masking and reveal functionality in WebUI
- Consolidate API key validation logic into `has_provider_api_key()` helper
- Improve update system: add branch filtering for tags, simplify backup naming
- Add branch detection to version info and default to current branch for updates
- Extract configure model settings link to constant
2026-03-24 14:41:46 +01:00
keyboardstaff
1bd5bc01d6 refactor(chat_branching): ID-based log ↔ history linking for precise branch trimming 2026-03-24 03:04:09 -07:00
frdel
7e1d9ad2a4 refactor: migrate extension system to use deep directory paths based on module and qualname
- Change @extensible decorator to generate extension paths from full module and qualname hierarchies instead of flattened names
- Update extension path format from `{module}_{qualname}_{start|end}` to `_functions/<module>/<qualname>/{start|end}`
- Move all extension files to new deep directory structure under `_functions/` to match new path format
- Replace PathSpec.from_lines(GitWildMatchPattern, ...) with PathSpec.from_lines
2026-03-22 21:48:01 +01:00
Jan Tomášek
69317765c9
Merge pull request #1293 from linuztx/refactor-split-system-prompt
Refactor prompts system
2026-03-22 17:00:07 +01:00
frdel
a5620506d5 refactor: rename state_sync namespace to webui and simplify handler event registration
- Rename /state_sync namespace to /webui throughout codebase
- Remove get_event_types() from WebSocketHandler - handlers now process all events for their namespace
- Replace per-event handler registration with namespace-wide registration
- Add validate_event_type() class method for runtime event name validation
- Update UserMessage instantiation to use keyword arguments (message=, attachments=)
- Move send_data
2026-03-20 15:34:59 +01:00
linuztx
8847af089a refactor: use @extensible decorator on build_prompt functions 2026-03-20 12:48:26 +08:00
linuztx
2566ee134d refactor: split system prompt into per-concern extensions with extensibility hooks
- split monolithic _10_system_prompt.py into focused extensions: main (10), tools (11), mcp (12), skills (13), secrets (13), project (14)
- each extension exposes a build_prompt() function with call_extensions_async hook for plugin extensibility
- move tool prompt collection from VariablesPlugin to _11_tools_prompt using subagents.get_paths for proper directory coverage
- add {{include original}} directive to process_includes allowing prompt inheritance without copy-paste
- add agent.system.main.specifics.md for subagent-specific additions without overriding entire role
- remove redundant plugin prompt extensions (_15_text_editor, _20_code_execution) that duplicated tool collection
- add _09_text_editor_config to register per-file kwargs via agent.data instead of VariablesPlugin in prompts dir
2026-03-20 12:12:47 +08:00
frdel
31ddee713c refactor: move allow_chat_override to top-level config and improve datetime parsing
- Move allow_chat_override from chat_model to top-level configuration
- Update all references to use new config path
- Set default to true in default_config.yaml, false in migration
- Fix datetime parsing to handle timezone-less ISO strings by appending 'Z'
- Remove inline style from tune icon in config.html
2026-03-19 21:17:48 +01:00
frdel
590119eb2b Merge branch 'development' of https://github.com/agent0ai/agent-zero into development 2026-03-18 21:07:41 +01:00
frdel
e4f974b80d refactor: add file system watchdog support for API handlers, extensions, and plugins
- Add `watchdog` dependency to requirements.txt
- Implement cache entry timestamps with `CacheEntry` dataclass for LRU-style tracking
- Add `trim_cache` function to remove stale entries based on age
- Update cache operations to track and update entry timestamps on access
- Add `_get_matching_areas` helper for wildcard pattern matching in cache clearing
- Register watchdogs for API handlers, extensions, and plugins to
2026-03-18 21:07:33 +01:00
keyboardstaff
3b86ebb837 feat: Standalone preset storage, override permission hardening & bug fixes
- Extract presets into global presets.yaml; move editor to plugin main screen
- Add project-wide override sync and three-layer permission checks
- Fix embedding change detection, new-chat inheritance, and preset name leak bugs
- Clean up dead imports/params and fix description text
2026-03-18 06:49:54 -07:00
keyboardstaff
d294ce72d1 update Preset key warning banner links to plugin settings modal 2026-03-17 00:51:48 -07:00
keyboardstaff
b012fd25ae Preset API key missing warning banner 2026-03-16 03:17:25 -07:00
keyboardstaff
cd5850bdb3 feat: agent_info prompt shows active preset 2026-03-15 06:47:15 -07:00
keyboardstaff
16defe4b1b Cleanup browser_http_headers after model refactor 2026-03-14 23:56:57 -07:00
keyboardstaff
8d33cae0e1 refactor: remove browser model, use chat model for browser; update extension references 2026-03-14 20:06:43 -07:00
frdel
ab9fc4ee7f Refactor extensions to async/sync API
Redesign extension handling to support explicit async/sync execution. helpers/extension.py rewrites the extensible decorator, adds call_extensions_async / call_extensions_sync, and a helper to gather extension classes; caching flag adjusted. Updated call sites across the codebase (agent, APIs, plugins, tools, settings, extensions) to use extension.extensible and the new call_extensions_async/sync API, and converted several extension handlers from async to sync. Also small frontend tweaks (use globalThis.runtimeInfo) and minor import updates (csrf_protect in run_ui). This centralizes extension discovery/execution and avoids previously scattered asyncio.run usage.
2026-03-06 11:32:08 +01:00
frdel
d02dda3667 BIG PYTHON REFACTOR
Python scripts moved out of python/ folder to root to be unified with plugins

+ frontend extension around api calls
2026-03-05 17:28:11 +01:00