feat: add CrewAI APort task decorator#91
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a521a075f5
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| _build_context(func, context, args, kwargs), | ||
| strict, | ||
| ) | ||
| return func(*args, **kwargs) |
There was a problem hiding this comment.
Strip verification-only kwargs before invoking task
The decorator advertises runtime agent IDs via aport_agent_id/agent_id, but both wrappers forward kwargs unchanged into the task call. For tasks that do not declare these parameters (a common case), calling task(..., aport_agent_id="...") triggers TypeError after verification, so the documented runtime override path is effectively broken unless every task accepts those extra kwargs (or **kwargs). Remove/decorate these internal kwargs before calling the wrapped function.
Useful? React with 👍 / 👎.
|
I would like to work on this. Building the CrewAI task decorator integration now. |
Summary
Closes #30 by adding a CrewAI-focused APort verification decorator under
examples/agent-frameworks/crewai.The integration includes:
@aport_verifydecorator for sync and async task functionsAPortHTTPClientfallbackAPortVerificationErrorhandling before task executionValidation
PYTHONPATH=src python3 -m unittest discover -s testspython3 -m compileall src tests examplesPYTHONPATH=src python3 examples/basic_usage.pygit diff --check