Files
Alessandro Frau d6d9f0507d Register Document Query from its skill
Let loaded skills declare callable schemas and bind them through plugin extensions using normal scoped skill resolution. Use the same binding for native tool declarations, Tool Access, and dispatch.

Move Document Query behind the skill registration and remove both standalone entry points. Preserve saved denials, destination permissions, and the existing indexing, worker, and streaming backend.
2026-11-24 21:49:00 +01:00

2.4 KiB

Python Function Extensions DOX

Purpose

  • Own implicit @extensible backend hook implementations.
  • Preserve nested module, class/function, method, and start/end extension layout.

Ownership

  • Each nested path mirrors a Python module and qualname segment.
  • Leaf start/ and end/ directories own ordered extension files for that extensible function point.

Local Contracts

  • Do not flatten nested qualname paths into retired legacy folder names.
  • Extension functions must match the implicit hook's supplied arguments.
  • Preserve ordering prefixes where exception handling, watchdog registration, or cleanup depends on them.
  • Hooks that mirror persisted AI responses into UI logs must reuse existing stream log items and avoid duplicating live response-tool logs. Free text, native-call commentary, recovered reasoning and thoughts/headline-only JSON remain generation steps. LogPlainResponses displays unstructured Responses text as thoughts without creating a response bubble or closing a process group.
  • The AgentContext.run_task/end hook attaches integration callbacks to the returned DeferredTask; keep terminal side effects out of agent.py.
  • The Agent.monologue/end hook reconciles successful main-agent continuations with errored scheduler tasks using the persisted task UUID (or the context ID for legacy dedicated chats). Use a checked scheduler update so disabled, removed, reassigned, and scheduler-managed running tasks are preserved; do not advance planned launch times again.
  • Recovery-loop circuit breakers must stop at the General Settings limit and render their user-visible cost warning from a core framework prompt. Core retries must work without optional plugin prompts; a missing Context Doctor fallback prompt does not affect the core warning budget.
  • Prompt settings snapshots must be task-local, accessed through get_settings_for_prompt(), and end with the matching Agent.prepare_prompt call, including exceptional exits.
  • The Agent.get_tool/end hook resolves skill handlers only after file dispatch has no implementation. Keep handler registration in the owning plugin and recheck its policy through the ordinary execution hooks.

Work Guidance

  • Keep implicit hook extensions narrow and colocated with the exact function point they extend.

Verification

  • Run targeted tests for the affected function point after changes.

Child DOX Index

No child DOX files.