mirror of
https://github.com/agent0ai/agent-zero.git
synced 2026-12-04 01:18:39 +00:00
1.8 KiB
1.8 KiB
- Store gate pattern: wrap store-backed UI in
<template x-if="$store.myStore">and mount cleanup on the inner element. - Store definition: use
createStorefrom/js/AlpineStore.js; do not register Alpine stores inline in HTML or viaalpine:init. - Notifications: use
toastFrontendError,toastFrontendSuccess, or backend notification helpers; do not render inline error boxes. - Python extensions: use
extensions/python/<point>/for named lifecycle hooks andextensions/python/_functions/<module>/<qualname>/<start|end>/for implicit@extensiblehooks. The flattenedextensions/python/<module>_<qualname>_<start|end>/layout is stale and should be flagged. - API handlers: subclass
ApiHandlerand return a dict orResponse. - Tools: subclass
Toolfromhelpers.tool. - AgentContext imports: use
from agent import AgentContext, AgentContextType, neverhelpers.context. - Hooks runtime targeting: use
sys.executableonly for framework runtime work and/opt/venv/bin/pythonfor agent-runtime installs. - execute.py pattern: expose
main()and end withif __name__ == "__main__": sys.exit(main()). - Community contribution: plugin name must match
^[a-z0-9_]+$, match the directory name, and stay unique in the published index. plugin.yaml:a0_versionis optional and supported. Validate quoted exact versions, comparison ranges, inclusive hyphen ranges, wildcards or lists of alternatives against/a0/docs/developer/plugins.md. Keep it separate from the plugin's ownversion; omission is valid, and current-version mismatches are advisory warnings with a user override in the Hub.- LICENSE: a file named
LICENSEat the plugin root is optional for local-only plugins but required at the repository root before Plugin Index submission; if missing, rate Structure Validation as warning (not pass) and state that clearly in findings.