Commit Graph

4 Commits

Author SHA1 Message Date
Lucas Gomide
356215a9f7 refactor: drop speculative interception points from the catalog
Removes `pre_delegation`, `retry_attempt`, `flow_transition`, and
`router_decision` — none has a hard use case yet, and `retry_attempt`
was wired at three unrelated seams (agent task retry, tool parse retry,
guardrail retry) with a different payload at each, so its semantics were
ambiguous. Also casts the `post_step` payload back to `TaskOutput` in
`task.py` so the seam keeps mypy green.
2026-07-14 03:14:45 -03:00
Lucas Gomide
6e1156ae37 feat: wire remaining interception points and document the catalog
Wires the step, agent, subsystem, and flow points onto the dispatcher:
`pre_step`/`post_step`, `tool_selection`, `pre_delegation`, `retry_attempt`,
`memory_write`/`memory_read`, `knowledge_retrieval`, `pre_code_execution`,
`mcp_connect`, `flow_transition`, and `router_decision`, extending the typed-
context module with their contexts. Each seam passes a typed context whose
`payload` a hook may observe, mutate, or replace. Adds the conformance suite
for these points and a new `interception-hooks` doc page with the full
point/payload catalog and the interceptor contract.
2026-07-14 02:37:16 -03:00
Lucas Gomide
19e70cae92 chore: drop redundant seam comments from execution-boundary wiring
Removes two inline comments narrating the OUTPUT/EXECUTION_END dispatch
ordering in `crew.py` and the flow runtime, plus a stray sentence about
enterprise adapters in the conformance-suite docstring. Comment-only
cleanup, no behavior change.
2026-07-14 02:29:50 -03:00
Lucas Gomide
8fa8dc9571 feat: wire execution-boundary interception points
Adds the typed interception contexts (`crewai/hooks/contexts.py`) and wires
the `execution_start`, `input`, `output`, and `execution_end` points for both
crews and flows through the dispatcher. `prepare_kickoff` and
`Flow.kickoff_async` fire `execution_start`/`input` so a hook can rewrite
resolved inputs before the run, while `Crew._create_crew_output` and the flow
tail fire `output`/`execution_end` so the final result can be observed or
replaced. Closes the eight critical-path points without touching the legacy
hooks.
2026-07-13 16:18:45 -03:00