Commit Graph

2209 Commits

Author SHA1 Message Date
Greyson LaLonde
a3d25c661a fix: register RuntimeState in Flow.from_checkpoint
Crew.from_checkpoint called set_runtime_state but Flow.from_checkpoint
did not, leaving the event bus without the restored state.
2026-04-04 03:09:57 +08:00
Greyson LaLonde
7f24d74795 fix: use real pydantic instances in executor tests, preserve cache handler across re-validation
- Replace MagicMock fixtures with real Agent/Task instances in
  test_async_agent_executor.py so pydantic validation passes
- Guard CacheHandler creation in Crew.set_private_attrs to avoid
  replacing an existing handler when the model validator re-runs
  during RuntimeState registration
2026-04-04 03:05:06 +08:00
Greyson LaLonde
fba56056c0 fix: use spec= on mocks for typed executor fields 2026-04-04 02:16:34 +08:00
Greyson LaLonde
f9d58d4d32 fix: add BaseAgentExecutor to model_rebuild chain 2026-04-04 02:11:48 +08:00
Greyson LaLonde
fb8b59d001 fix: guard register_entity when RuntimeState is None 2026-04-04 02:07:48 +08:00
Greyson LaLonde
191053c41b refactor: generic from_checkpoint with provider, full LLM serialization 2026-04-04 01:25:31 +08:00
Greyson LaLonde
6dc9f462f9 feat: mid-task checkpoint resume and executor refactor 2026-04-04 01:07:45 +08:00
Greyson LaLonde
5ace0bfe4a fix: suppress duplicate lifecycle events on checkpoint resume 2026-04-03 23:02:16 +08:00
Greyson LaLonde
c653d41b89 feat: add EventRecord to RuntimeState checkpoints 2026-04-03 22:31:36 +08:00
Greyson LaLonde
de9300705d refactor: move RuntimeState to state/, add async checkpoint with provider pattern
- Move runtime_state.py to state/runtime.py
- Add acheckpoint async method using aiofiles
- Introduce BaseProvider protocol and JsonProvider for pluggable storage
- Add aiofiles dependency to crewai package
- Use PrivateAttr for provider on RootModel
2026-04-03 21:29:27 +08:00
Greyson LaLonde
1ed6646eae refactor: move RuntimeState to runtime_state.py, type _runtime_state on event bus 2026-04-03 20:36:57 +08:00
Greyson LaLonde
2e1525f69a fix: mypy errors in streaming.py and core.py 2026-04-03 19:32:29 +08:00
Greyson LaLonde
caaccd748d fix: validate entity_type tag before auto-registering in emit() 2026-04-03 18:49:23 +08:00
Greyson LaLonde
3a08e954e7 fix: replace object.__new__ and MinimalExecutor subclass with proper construction 2026-04-03 18:42:31 +08:00
Greyson LaLonde
0b980db1e9 fix: use spec= on test mocks for typed executor fields 2026-04-03 17:42:47 +08:00
Greyson LaLonde
de9f121cf7 fix: type remaining Any fields on CrewAgentExecutor 2026-04-03 17:32:00 +08:00
Greyson LaLonde
78fbe455b9 fix: TokenCalcHandler hashability, test MinimalExecutor as instance 2026-04-03 17:25:51 +08:00
Greyson LaLonde
6504e39d47 feat: type executor fields, auto-register entities in event bus, convert TokenProcess to BaseModel 2026-04-03 17:12:41 +08:00
Greyson LaLonde
2c4914b0d0 Merge branch 'main' into chore/runtime-state-event-bus 2026-04-03 12:46:00 +08:00
iris-clawd
931f3556cf ci: add vulnerability scanning with pip-audit and Snyk (#5242)
Some checks failed
CodeQL Advanced / Analyze (actions) (push) Has been cancelled
CodeQL Advanced / Analyze (python) (push) Has been cancelled
Vulnerability Scan / pip-audit (push) Has been cancelled
Build uv cache / build-cache (3.10) (push) Has been cancelled
Build uv cache / build-cache (3.11) (push) Has been cancelled
Build uv cache / build-cache (3.12) (push) Has been cancelled
Build uv cache / build-cache (3.13) (push) Has been cancelled
Mark stale issues and pull requests / stale (push) Has been cancelled
* ci: add vulnerability scanning with pip-audit and Snyk

Add a new GitHub Actions workflow that runs on PRs, pushes to main, and weekly:

- pip-audit: scans all Python dependencies (direct + transitive) against
  PyPI Advisory DB and OSV for known CVEs. Outputs JSON report as artifact
  and posts results to the job summary.
- Snyk: optional enterprise-grade scanning (gated behind SNYK_ENABLED
  repo variable and SNYK_TOKEN secret). Runs on high+ severity and
  monitors main branch.

This addresses the need for automated pre-release vulnerability scanning
to catch dependency CVEs before cutting releases.

* ci: pin Snyk action to @v1 tag and remove continue-on-error

- Pin snyk/actions/python from @master to @v1 to prevent supply chain
  risk from mutable branch references (matches convention of other
  actions in the repo using versioned tags)
- Remove continue-on-error on the Snyk check step so high+ severity
  vulnerabilities actually fail the build

* ci: fail build when pip-audit crashes without producing a report

If pip-audit exits abnormally without writing pip-audit-report.json,
the Display Results step now emits an error annotation and exits 1
instead of silently passing.

* ci: fix pip-audit failing on local packages

Replace --strict with --skip-editable to avoid pip-audit failing when
it encounters local/private packages (e.g. crewai-devtools) that are
not published on PyPI. The --skip-editable flag tells pip-audit to
skip packages installed in editable/development mode while still
auditing all published dependencies.

* fix: bump vulnerable dependencies and ignore unfixable CVEs

Dependency upgrades (via uv lock --upgrade-package):
- aiohttp 3.13.3 → 3.13.5 (fixes 10 CVEs)
- cryptography 46.0.5 → 46.0.6 (fixes CVE-2026-34073)
- pygments 2.19.2 → 2.20.0 (fixes CVE-2026-4539)
- onnx 1.20.1 → 1.21.0 (fixes 6 CVEs)
- couchbase 4.5.0 → 4.6.0 (fixes PYSEC-2023-235)

Temporarily ignored CVEs (cannot be fixed without upstream changes):
- CVE-2025-69872 (diskcache): no fix available, latest version
- CVE-2026-25645 (requests): needs 2.33.0, blocked by crewai-tools pin
- CVE-2026-27448/27459 (pyopenssl): needs 26.0.0, blocked by
  snowflake-connector-python pin
- PYSEC-2023-235 (couchbase): advisory not yet updated for 4.6.0

* chore: remove accidentally committed egg-info files

* ci: remove Snyk job, pip-audit is sufficient

pip-audit covers Python dependency CVE scanning against PyPI Advisory DB
and OSV, which is all we need for pre-release checks. Snyk adds
complexity (account setup, token management) without meaningful
additional coverage for this use case.

---------

Co-authored-by: Greyson LaLonde <greyson.r.lalonde@gmail.com>
2026-04-03 01:44:44 -03:00
Greyson LaLonde
5179b411cd Merge branch 'main' into chore/runtime-state-event-bus 2026-04-03 12:43:14 +08:00
Greyson LaLonde
9ab85e642c refactor: make CrewAgentExecutorMixin a proper base class with Fields instead of PrivateAttr properties 2026-04-03 12:41:13 +08:00
Greyson LaLonde
743ebedd1b fix: preserve kickoff_event_id on resume, verbose already works 2026-04-03 12:21:05 +08:00
Greyson LaLonde
2e1f882234 feat: convert executor/tools/prompts to BaseModel, enable checkpoint resume via kickoff() 2026-04-03 12:03:11 +08:00
Lorenze Jay
914776b7ed docs: update changelog and version for v1.13.0 (#5247)
Some checks failed
CodeQL Advanced / Analyze (actions) (push) Has been cancelled
CodeQL Advanced / Analyze (python) (push) Has been cancelled
Check Documentation Broken Links / Check broken links (push) Has been cancelled
Nightly Canary Release / Check for new commits (push) Has been cancelled
Nightly Canary Release / Build nightly packages (push) Has been cancelled
Nightly Canary Release / Publish nightly to PyPI (push) Has been cancelled
1.13.0
2026-04-02 16:16:16 -07:00
Lorenze Jay
6ef6fada4d feat: bump versions to 1.13.0 (#5246) 2026-04-02 16:12:03 -07:00
Lucas Gomide
1b7be63b60 Revert "refactor: remove unused and methods from (#5172)" (#5243)
* Revert "refactor: remove unused  and  methods from (#5172)"

This reverts commit bb9bcd6823.

* test: fix tests
2026-04-02 18:02:59 -04:00
Greyson LaLonde
cf241d85e8 feat: pass RuntimeState through event bus, add .checkpoint() and .from_checkpoint() 2026-04-03 05:33:15 +08:00
alex-clawd
59aa5b2243 fix: add tool repository credentials to crewai install (#5224)
* fix: add tool repository credentials to crewai install

crewai install (uv sync) was failing with 401 Unauthorized when the
project depends on tools from a private package index (e.g. AMP tool
repository). The credentials were already injected for 'crewai run'
and 'crewai tool publish' but were missing from 'crewai install'.

Reads [tool.uv.sources] from pyproject.toml and injects UV_INDEX_*
credentials into the subprocess environment, matching the pattern
already used in run_crew.py.

* refactor: extract duplicated credential-building into utility function

Create build_env_with_all_tool_credentials() in utils.py to consolidate
the ~10-line block that reads [tool.uv.sources] from pyproject.toml and
calls build_env_with_tool_repository_credentials for each index.

This eliminates code duplication across install_crew.py, run_crew.py,
and cli.py, reducing the risk of inconsistent bug fixes.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* fix: add debug logging for credential errors instead of silent swallow

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-04-02 17:56:36 -03:00
alex-clawd
2e2fae02d2 fix: add tool repository credentials to uv build in tool publish (#5223)
* fix: add tool repository credentials to uv build in tool publish

When running 'uv build' during tool publish, the build process now has access
to tool repository credentials. This mirrors the pattern used in run_crew.py,
ensuring private package indexes are properly authenticated during the build.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* fix: add env kwarg to subprocess.run mock assertions in publish tests

The actual code passes env= to subprocess.run but the test assertions
were missing this parameter, causing assertion failures.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-04-02 17:52:08 -03:00
Greyson LaLonde
6627845372 feat: pass RuntimeState through event bus, add .checkpoint(directory) 2026-04-03 04:19:06 +08:00
Greyson LaLonde
804c26bd01 feat: add RuntimeState RootModel for unified state serialization 2026-04-03 03:46:55 +08:00
Greyson LaLonde
4e46913045 fix: pass fingerprint metadata via config instead of tool args (#5216)
security_context was being injected into tool arguments by
_add_fingerprint_metadata(), causing Pydantic validation errors
(extra_forbidden) on MCP and integration tools with strict schemas.

Move fingerprint data to the `config` parameter that invoke/ainvoke
already accept, keeping it available to consumers without polluting
the tool args namespace.

Co-authored-by: Lorenze Jay <63378463+lorenzejay@users.noreply.github.com>
2026-04-02 12:21:02 -07:00
Lorenze Jay
335130cb15 feat: enhance event listener with new telemetry spans for skill and memory events (#5240)
- Added telemetry spans for various skill events: discovery, loading, activation, and load failure.
- Introduced telemetry spans for memory events: save, query, and retrieval completion.
- Updated event listener to include new MCP tool execution and connection events with telemetry tracking.
2026-04-02 10:38:02 -07:00
iris-clawd
186ea77c63 docs: Add coding agent skills demo video to getting started pages (#5237)
Some checks failed
CodeQL Advanced / Analyze (actions) (push) Has been cancelled
CodeQL Advanced / Analyze (python) (push) Has been cancelled
Check Documentation Broken Links / Check broken links (push) Has been cancelled
* docs: Add coding agent skills demo video to getting started pages

Add Loom demo video embed showing how to build CrewAI agents and flows
using coding agent skills. Added to introduction, quickstart, and
installation pages across all languages (en, ko, pt-BR, ar).

* docs: update coding skills description with install instructions

Replace demo description text with actionable install copy across
all languages (en, ko, pt-BR, ar) in introduction, quickstart, and
installation pages.
2026-04-02 10:11:02 -07:00
Greyson LaLonde
9e51229e6c chore: add ExecutionContext model for state 2026-04-02 23:44:21 +08:00
Greyson LaLonde
247d623499 docs: update changelog and version for v1.13.0a7 1.13.0a7 2026-04-02 22:21:17 +08:00
Greyson LaLonde
c260f3e19f feat: bump versions to 1.13.0a7 2026-04-02 22:16:05 +08:00
Greyson LaLonde
d9cf7dda31 chore: type remaining Any fields on BaseAgent and Crew 2026-04-02 21:17:35 +08:00
alex-clawd
c14abf1758 fix: add GPT-5 and o-series to multimodal vision prefixes (#5183)
Some checks failed
CodeQL Advanced / Analyze (actions) (push) Has been cancelled
CodeQL Advanced / Analyze (python) (push) Has been cancelled
Check Documentation Broken Links / Check broken links (push) Has been cancelled
Nightly Canary Release / Check for new commits (push) Has been cancelled
Nightly Canary Release / Build nightly packages (push) Has been cancelled
Nightly Canary Release / Publish nightly to PyPI (push) Has been cancelled
Mark stale issues and pull requests / stale (push) Has been cancelled
* fix: add GPT-5, o3, o4-mini to multimodal vision prefixes

Added verified vision-capable models:
- gpt-5 (all GPT-5 family — confirmed multimodal via openai.com)
- o3, o3-pro (full multimodal — openai.com/index/thinking-with-images)
- o4-mini, o4 (full multimodal)

Added text-only exclusion list to prevent false positives:
- o3-mini (text-only, replaced by o4-mini)
- o1-mini (text-only)
- o1-preview (text-only)

Existing prefixes unchanged (Claude 3+, Gemini, GPT-4).

* fix: add o1 to vision prefixes + ruff format

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* fix: guard _sync_executor access in test utils for lazy-init event bus

* fix: expand vision model coverage — Claude 5, Grok, Pixtral, Qwen VL, LLaVA

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* ci: retrigger — flaky test_hierarchical_verbose_false_manager_agent (ConnectionError)

* fix: remove hallucinated claude-5 models from vision prefixes — verified against official docs

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
Co-authored-by: João Moura <joaomdmoura@gmail.com>
2026-04-01 18:08:37 -03:00
Greyson LaLonde
f10d320ddb feat(a2ui): add A2UI extension with v0.8/v0.9 support, schemas, and docs
Introduce the A2UI extension for declarative UI generation, including
support for both v0.8 and v0.9 protocol specs. Add A2UI content type
integration in A2A utils, along with schema definitions, catalog models,
and client extension improvements.

Enhance models with explicit defaults, field descriptions, and ConfigDict,
and improve typing and instance state handling across the extension.

Add schema conformance tests and align test structure.

Add and register A2UI documentation, including extension guide and
navigation updates.
2026-04-02 04:46:07 +08:00
João Moura
258f31d44c docs: update changelog and version for v1.13.0a6 (#5214) 1.13.0a6 2026-04-01 14:26:07 -03:00
João Moura
68720fd4e5 feat: bump versions to 1.13.0a6 (#5213) 2026-04-01 14:23:44 -03:00
alex-clawd
3132910084 perf: reduce framework overhead — lazy event bus, skip tracing when disabled (#5187)
* perf: reduce framework overhead for NVIDIA benchmarks

- Lazy initialize event bus thread pool and event loop on first emit()
  instead of at import time (~200ms savings)
- Skip trace listener registration (50+ handlers) when tracing disabled
- Skip trace prompt in non-interactive contexts (isatty check) to avoid
  20s timeout in CI/Docker/API servers
- Skip flush() when no events were emitted (avoids 30s timeout waste)
- Add _has_pending_events flag to track if any events were emitted
- Add _executor_initialized flag for lazy init double-checked locking

All existing behavior preserved when tracing IS enabled. No public APIs
changed - only conditional guards added.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* fix: address PR review comments — tracing override, executor init order, stdin guard, unused import

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* style: fix ruff formatting in trace_listener.py and utils.py

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
Co-authored-by: Iris Clawd <iris@crewai.com>
Co-authored-by: Greyson LaLonde <greyson.r.lalonde@gmail.com>
2026-04-01 14:17:57 -03:00
Lucas Gomide
c8f3a96779 docs: fix RBAC permission levels to match actual UI options (#5210)
Some checks failed
CodeQL Advanced / Analyze (actions) (push) Has been cancelled
CodeQL Advanced / Analyze (python) (push) Has been cancelled
Check Documentation Broken Links / Check broken links (push) Has been cancelled
2026-04-01 10:35:06 -04:00
João Moura
18ada25f01 docs: update changelog and version for v1.13.0a5 (#5200)
Some checks failed
CodeQL Advanced / Analyze (actions) (push) Has been cancelled
CodeQL Advanced / Analyze (python) (push) Has been cancelled
Check Documentation Broken Links / Check broken links (push) Has been cancelled
Mark stale issues and pull requests / stale (push) Has been cancelled
1.13.0a5
2026-04-01 04:00:09 -03:00
João Moura
146da8d73a feat: bump versions to 1.13.0a5 (#5199) 2026-04-01 03:59:07 -03:00
Greyson LaLonde
98c6109214 docs: update changelog and version for v1.13.0a4
Some checks failed
CodeQL Advanced / Analyze (actions) (push) Has been cancelled
CodeQL Advanced / Analyze (python) (push) Has been cancelled
Check Documentation Broken Links / Check broken links (push) Has been cancelled
Build uv cache / build-cache (3.10) (push) Has been cancelled
Build uv cache / build-cache (3.11) (push) Has been cancelled
Build uv cache / build-cache (3.12) (push) Has been cancelled
Build uv cache / build-cache (3.13) (push) Has been cancelled
Nightly Canary Release / Check for new commits (push) Has been cancelled
Nightly Canary Release / Build nightly packages (push) Has been cancelled
Nightly Canary Release / Publish nightly to PyPI (push) Has been cancelled
1.13.0a4
2026-04-01 05:08:12 +08:00
Greyson LaLonde
54a9174c12 feat: bump versions to 1.13.0a4 2026-04-01 05:01:29 +08:00
Greyson LaLonde
c26ae969b3 docs: update changelog and version for v1.13.0a3 1.13.0a3 2026-04-01 04:16:25 +08:00