feat(F): F-CTX context_builder, F-STR agent_stream, F-DEF agent definition fields, F-SKILL skill_registry, F-TOOL agent_tools
Check Cross-Plugin Imports / check (push) Has been cancelled

- F-CTX: app/ai/context_builder.py (282 lines) — build_agent_context() + ReActSystemPromptBuilder
- F-STR: app/ai/agent_stream.py (155 lines) — stream_react_loop() with SSE events (step, status, done, error)
- F-DEF: AgentDefinition fields added (temperature, max_tokens, max_steps, trace_mode, skill_ids, trigger_config, ai_use_case_metadata) + migration 0122
- F-SKILL: app/ai/skill_registry.py (82 lines) — SkillDefinition + SkillRegistry singleton
- F-TOOL: app/ai/agent_tools.py (117 lines) — get_agent_tools() with permission intersection
- Skill CRUD routes: app/plugins/builtins/automation/skill_routes.py
- Tests: test_skill_registry.py (97 lines), test_agent_tools.py (219 lines)
- All Python compile checks pass, tests require PostgreSQL (infra issue, not code bug)
This commit is contained in:
Agent Zero
2026-08-17 16:40:55 +02:00
parent c760b5961c
commit dbeadd8ab1
14 changed files with 1457 additions and 1 deletions
@@ -59,6 +59,13 @@ def _agent_to_response(a: AgentDefinition) -> AgentDefinitionResponse:
max_executions_per_hour=a.max_executions_per_hour,
max_duration_seconds=a.max_duration_seconds,
budget_limit_usd=a.budget_limit_usd,
temperature=a.temperature,
max_tokens=a.max_tokens,
max_steps=a.max_steps,
trace_mode=a.trace_mode,
skill_ids=[str(s) for s in (a.skill_ids or [])],
trigger_config=a.trigger_config or {},
ai_use_case_metadata=a.ai_use_case_metadata or {},
created_by=str(a.created_by) if a.created_by else None,
created_at=a.created_at.isoformat() if a.created_at else None,
updated_at=a.updated_at.isoformat() if a.updated_at else None,