mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-11-25 06:59:28 +08:00
main
13
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
c81633aca1 |
feat(agents): read spreadsheet URLs in an agent's input with tools over every row (#9234)
* feat(agents): read spreadsheet URLs in an agent's input with tools over every row Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WfUv1NsUFz1RHjRgS73HBR * fix(agents): fetch only spreadsheet URLs a caller gave, and harden reading them Review found model-written URLs reaching the download (delegated tasks, string guardrails, crew planning, crew chat), a crash on CJK punctuation after a URL, an agent's own tools dropped with tools=[], repeated downloads, no cap on URLs, unsanitized names in the prompt, and URL extraction gaps. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WfUv1NsUFz1RHjRgS73HBR * fix(agents): keep model and remote text out of spreadsheet trust, bound downloads - Record a task's caller-written description before crew planning, crew-chat history or A2A text is added, and carry it through Task.copy and checkpoints (checkpoint_input_description); a template captured after a planned run no longer keeps the plan. - Decode only ";"-terminated character references before matching URLs, so escaped quotes and brackets end a URL, non-ASCII never reaches urlparse, and query names like "¶=" survive. - Read at most 10 URLs and add one line for the rest; number same-named files in linear time. - Share one 60s deadline across a run's downloads (new `deadline` keyword on safe_get_bounded), prune expired cached bodies, and find names that start with a quote. - Docs: the cap and download limit, in en, ar, ko and pt-BR. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WfUv1NsUFz1RHjRgS73HBR * fix(agents): cut stalled spreadsheet downloads at the deadline, trust every caller URL - safe_get_bounded: a watchdog shuts down every socket the download opened once the deadline passes (registered by the SSRF adapter at connect), so a server trickling bytes in the headers or body can no longer outlast it. Checking after each iter_content chunk never fired: a 64 KiB chunk can take weeks to fill at one byte per read timeout. - Empty inputs keep the caller text the last inputs filled in, matching the description (kickoff_async() passes {}). - A run trusts every spreadsheet URL its input gave, read or not, so a coworker can read one past the cap or after a failed download. - Make an implicit string concatenation in a test explicit. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WfUv1NsUFz1RHjRgS73HBR * fix(agents): cut sockets that connect after the deadline, and keep old checkpoints closed - A socket that connects after the download deadline passed (the next redirect hop) is shut down as it is watched; before, only sockets already in the list when the timer fired were. - A checkpoint now always records the caller's text, so a missing field marks one written before 1.15.38. Such a task reads spreadsheet URLs only from the template the caller wrote, not from a description crew planning or chat history was added to. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WfUv1NsUFz1RHjRgS73HBR * fix(agents): never cache spreadsheet answers, trim URLs in linear time, tame sheet names - The spreadsheet tools never write to the tool cache. In a Crew with cache=True, a second task whose file had the same name got the first task's answer back. - _trim walks a URL once from the end; a long run of ")" was quadratic. - Sheet names are cut to Excel's 31 characters and their double quotes turned into single ones, so a crafted name can't close the quotes it is shown in. The name shown is the name the tools accept. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WfUv1NsUFz1RHjRgS73HBR * docs: model output put into an agent's input counts as its input Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WfUv1NsUFz1RHjRgS73HBR * fix(agents): an old checkpoint's unknown caller text stays unknown on resume A task restored from a checkpoint from before 1.15.38 without a template has "" for its caller text. Interpolating inputs on resume used to replace that with the description, plan included; now it stays "", through later checkpoints too, so no spreadsheet URL is read from that task. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WfUv1NsUFz1RHjRgS73HBR * fix(agents): keep prompt placeholders in a file's text from being filled in AgentExecutor fills {tools} and {tool_names} in after the input is placed, so a sheet name, header or cell holding one pulled the tool catalog into the file's data. The overview now shows them as "{ tools }". Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WfUv1NsUFz1RHjRgS73HBR * fix(agents): cut a download stalled in its TLS handshake, and skip huge references - The watchdog holds a duplicate of each socket's descriptor from the moment it connects. Shutting the duplicate down ends a read in the TLS handshake too, where the plain socket is already detached into the TLS one, and the duplicates are closed when the download ends, so a reused descriptor number is never touched. It replaces the connect() overrides. - Character references are decoded only up to what a code point needs; html.unescape raised on more than 4300 digits and aborted the run. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WfUv1NsUFz1RHjRgS73HBR --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
2666f26339 |
fix(deps): pin crewai-files in the file-processing extra like its siblings (#8925)
* fix(deps): pin crewai-files in the file-processing extra like its siblings crewai pinned crewai-core, crewai-cli and crewai-tools to its own version but listed crewai-files bare, and devtools skipped bumping it. Consumers that upgraded crewai kept their locked crewai-files: enterprise moved to crewai 1.15.34 still on crewai-files 1.15.29, whose pypdf floor predates seven pypdf advisories. Pin it to the release version and let the bump move it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(deps): move the crewai-files pin to 1.15.35 after merging main The 1.15.35 bump ran before this branch's devtools change, so it skipped crewai-files and left this branch's pin at 1.15.34. test_crewai_pins_every_workspace_sibling_to_its_own_version caught the drift. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
5bb6f23a16 |
feat(devtools): open a standalone litellm catalog PR before the version bump (#8799)
* feat(devtools): open a standalone litellm catalog PR before the version bump Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> * fix(devtools): check for a catalog change before creating its branch Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> * test(anthropic): isolate lazy completion import --------- Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com> |
||
|
|
87c2868123 |
feat(cli): rewrite the scaffolded AGENTS.md and fail PRs that teach coding agents less (#8298)
* feat(cli): rewrite the scaffolded AGENTS.md around the CrewAI + AMP workflow The template opened with an API reference and mentioned traces, eval and deployment as optional extras, so coding agents rarely used them. It now opens with the steps an agent follows in a session (set up, reuse what the organization has on AMP, run, trace and evaluate every change, deploy when the work has to run elsewhere), then a short reference of the facts models get wrong. About 3.3K tokens instead of 11.9K, with outdated claims corrected. Tests assert the behaviours the old wording carried, check every documented `crewai` command against the CLI, and keep numbered lists gapless with and without the evaluation blocks. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * feat(cli): index the features AGENTS.md no longer details, and guard the file The workflow rewrite dropped references to guardrails, knowledge, MCP, conversational and declarative flows, checkpoints and more. An "Also available" index under Reference names each one with its API and docs path. Tests now guard the shipped file on every PR: a reference manifest, a token budget, text that is wrong on main, imports that must resolve, python blocks that must parse, and docs paths that must exist. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * feat(cli): add a core API section to AGENTS.md for models that don't know CrewAI Measured with OpenAI models, the workflow rewrite lost the basics they don't know without the file: flow decorators and state, the @CrewBase class, task fields, CrewOutput and custom tools. A short Core API section restores them and folds in the two crew and router facts it would otherwise repeat. The reference manifest now guards those core references too. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * ci: run the AGENTS.md guards on PRs that touch the template The guards live in lib/cli/tests, which the main test workflow doesn't run. A path-filtered job runs them when the template, its tests or the docs pages it links change. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * ci: run the AGENTS.md workflow only on pull requests against main Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * feat(cli): close the gaps where AGENTS.md taught less than the file it replaces Question by question against today's file, V6 trailed on facts it had cut or worded loosely: the context window and date options, task output folders and human review, the guardrail's return shape, test targets before writes, the eval's structural fixes, logged-in trace visibility, partial selector misses, written IDs for silent failures, ZIP deploys with an origin, the flow memory root, and LiteLLM for providers outside the native set. Each is back, verified on main. Measured on Claude Code (Haiku, Sonnet) and Codex, no question now scores below today's file. The token budget rises to 4,800 to hold them. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * feat(cli): teach the hooks and planning that telemetry counts, and three facts the old file had The index named kickoff hooks and Crew(planning=True), but the features most projects use are interception hooks (@on(InterceptionPoint...) in crewai.hooks) and agent planning (Agent(planning_config=PlanningConfig(...))). Both lines now lead with those. Three facts today's file taught come back: OpenAI's Responses API, agents judge while code computes, and answering a paused deployed flow through AMP's human_feedback_requests API. Measured on 221 questions in Claude Code (Haiku, Sonnet) and Codex, no question scores below today's file. The budget rises to 5,000 tokens, guards cover the new lines, and the never-teach list allows naming reasoning=True as replaced. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * feat(devtools): agents-md-eval fails a PR whose AGENTS.md teaches coding agents less `devtools agents-md-eval` asks a 218-question bank in fresh, tool-less Claude Code and Codex sessions, once with the base branch's AGENTS.md and once with this branch's, grades each answer by its key, and exits non-zero when either agent scores more than 10% below the base. The AGENTS.md workflow runs it on PRs that change the template, the eval or its questions. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * feat(devtools): run the AGENTS.md eval per model and count sessions with no answer The action asks Claude Code with the latest Haiku and Sonnet and Codex with gpt-5.6-luna and gpt-5.6-sol, one job per model. A session that hangs, fails or returns nothing is retried once and then counted; past 2% unanswered the comparison is called unreliable instead of scored. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * ci: run the AGENTS.md eval only on pull requests against main Drops the manual trigger and the conditions it needed; a test pins the trigger. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * feat(devtools): say why AGENTS.md eval sessions gave no answer Each unanswered session records its exit code and last error line (keys redacted) or a timeout, and the command prints the most common reasons, so a run called unreliable can be diagnosed from the CI log. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(devtools): grade 'is a different command' as a warning, accept 'call the agent directly' Two answer-key misses found reading V6's answers: a correct answer that warns off `crewai update` tripped its trap, and "No. Call the agent directly" didn't count as needing no crew. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(devtools): B-065's trap fires only on advice to run crewai update Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(devtools): read a failed session's reason from stdout when stderr is empty Claude Code prints some failures, such as 'Not logged in', on stdout. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(devtools): accept 'never a fix' in C-018's key Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(devtools): read typographic apostrophes and 'replaces' as warnings in traps Codex writes "don’t"; the negation check knew only "don't", so its warnings counted as recommendations. "X replaces reasoning=True" now reads as a warning too. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * feat(devtools): add hooks and agent planning questions; D-018 needs the tools, not the package name Three questions for features telemetry counts and the bank missed: tool-call hooks, LLM-call hooks and agent planning (221 questions). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * feat(cli): AGENTS.md teaches that crewai eval runs the crew itself, logged in or out Since #8270, `crewai eval` runs the crew, traced, when the project changed since its last traced run. The file still said to `crewai run` first, and that a run without a terminal is traced only when logged in, so logged-out coding agents logged in or stopped instead of evaluating. It now says `crewai eval` works logged in or out, with or without a terminal, with no `crewai run` between rounds and no wait on a login. The CLI test's command parser stops at a group that runs without a subcommand (`crewai eval`, `crewai eval --models ...`), which `crewai eval` became when it gained `export`. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(devtools): ask whether crewai eval needs a login, and read "doesn't" as a warning Two questions join the bank: can a logged-out coding agent with no terminal get a verdict, and does it need `crewai run` first. Three keys follow main: C-004 and B-051 accept `crewai eval` (it runs and traces the crew), C-032 accepts "flow code". Negations now include doesn't, didn't, aren't and can't, so "evaluation doesn't require an account" no longer trips the trap it warns against. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(ci): run the AGENTS.md eval from the base commit, with the PR's files as data The eval job checked out the pull request and ran its devtools with both API keys in the environment, so a branch could print or send them. It now checks out the base commit, fetches the pull request's commit only to read its AGENTS.md and CLAUDE.md (`agents-md-eval --head <sha>`), and runs in the `agents-md-eval` environment, where the keys can sit behind a required reviewer. When the base branch has no eval yet, the job skips with a notice. The eval also names a session's real error: Claude Code can end its output with a JSON log line after the message ("Invalid API key"), which hid every Haiku failure. Item text and reasons print as text, so `[tool.crewai]` isn't dropped and `[/...]` can't raise MarkupError after the paid runs. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(cli): AGENTS.md says deploys build from any git origin, not only GitHub `crewai deploy create` sends whatever `origin` URL the project has, and AMP builds from GitHub or another git host (`any_git`). The file said an origin meant GitHub, which pointed GitLab and other users at the wrong fix. The GitHub integration note now applies to GitHub only, and a guard keeps it so. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(ci): run the AGENTS.md eval on pull_request_target, so its keys reach only reviewed code Under pull_request a branch's own copy of the workflow runs, so a pull request could edit the eval's steps and still get the keys. The eval now has its own workflow on pull_request_target: GitHub runs it from the base branch, the job checks out the base commit, and the pull request's AGENTS.md and CLAUDE.md are fetched and read as data, never run. It runs for this repository's branches only, since pull_request_target would hand the keys to forks too, and it fetches the pull request's commit only once it knows it will run, so a skip can't fail on the fetch. The guards stay on pull_request, with no secrets, and no longer persist the checkout's token for the pull request's code to read. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(devtools): accept "go-ahead" as asking first in C-052's key "Publishing writes to your organization, so it needs your go-ahead first" asks before publishing, but the key only matched ask, approve, confirm or permission, so correct answers scored wrong. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
13b7c3079f |
Refresh the LiteLLM catalog after the version-bump PR merges. (#8103)
The release docs PR now downloads the checked-in model catalog so context-window data ships with the tagged release. |
||
|
|
b1b6f6f539 | feat(devtools): bump Flow canary on release (#6830) | ||
|
|
2b87098279 |
fix: cut docs version nav from Edge so new pages aren't dropped (#6349)
* fix: freeze docs version nav from Edge instead of previous release The docs cut copied every Edge file into the new `docs/v<X.Y.Z>/` snapshot but built that version's `docs.json` navigation by cloning the previous frozen release and only rewriting path prefixes. Pages added to Edge since the last release were therefore copied to disk yet never linked in the version selector, which is why the v1.15.0 cut shipped without the Datadog guide. `_build_new_entry` now clones the Edge nav entry and rewrites `edge/<locale>/` to `v<new>/<locale>/`, so promoting Edge to Latest carries every current page and nav restructuring. * docs: link the v1.15.0 Datadog guide dropped during the cut The v1.15.0 freeze copied `enterprise/guides/datadog` into the snapshot for every locale but never linked it in `docs.json`, because the cut cloned the v1.14.7 nav instead of Edge. This backfills the missing nav reference in the `en`, `pt-BR`, `ko`, and `ar` v1.15.0 blocks so the already-shipped page is reachable from the version selector. Pairs with the `_build_new_entry` fix that prevents future cuts from dropping pages. * docs: link the v1.15.1 Datadog guide dropped during the cut The v1.15.1 cut ran before the freeze-from-Edge fix landed, so it inherited the same bug as v1.15.0: `enterprise/guides/datadog` was copied into the snapshot for every locale but never linked in `docs.json`. This backfills the missing nav reference in the `en`, `pt-BR`, `ko`, and `ar` v1.15.1 blocks so the page is reachable from the version selector. |
||
|
|
a237ebabba |
feat: adopt directory-based docs versioning with Edge channel (#6202)
* feat: adopt directory-based docs versioning with Edge channel Switch docs.crewai.com from navigation-only versioning (every version selector entry rendered the same docs/<lang>/* source files) to Mintlify's directory-based versioning so each version selector entry renders its own snapshot. Add an "Edge" channel under docs/edge/<lang>/* that always reflects main HEAD for unreleased work, eliminating pre-release leakage onto frozen release labels. External links to canonical /<lang>/* URLs are preserved via wildcard redirects that always land on the current default version. Layout: - docs/edge/<lang>/* rolling source (you edit here) - docs/edge/enterprise-api.*.yaml - docs/v<X.Y.Z>/<lang>/* frozen, immutable snapshots - docs/v<X.Y.Z>/enterprise-api.*.yaml - docs/images/ shared, append-only - docs/docs.json nav + redirects URLs follow the Mintlify-idiomatic shape: /edge/<lang>/<page> for Edge, /v<X.Y.Z>/<lang>/<page> for every frozen snapshot. The wildcard redirects /<lang>/:slug* -> /<default>/<lang>/:slug* keep stale links working, and every freeze rewrites them (plus all per-section/per-page redirects) so destinations always resolve to the current default without depending on a second redirect hop. Release flow integration (devtools release): - New module crewai_devtools.docs_versioning.freeze() materialises docs/v<X.Y.Z>/ from docs/edge/, rewrites openapi: refs inside the snapshot, inserts the version into every language block in docs.json, and refreshes all redirect destinations. - _update_docs_and_create_pr() in cli.py now calls that freeze during Phase 2 of devtools release. Edge changelogs are updated first (so the snapshot freeze picks them up), then the snapshot is staged alongside docs.json, branched as docs/freeze-v<X.Y.Z>, and the PR is titled [docs-freeze] docs: snapshot and changelog for v<X.Y.Z> — the title prefix the new CI guard reads. - The PR still gates tag, GitHub release, PyPI publish, and the enterprise release as before; no new PRs are added. - Pre-releases (1.X.YaN, 1.X.YbN, ...) skip the snapshot — they ride Edge — and the docs PR title omits the [docs-freeze] prefix. - docs_check (AI-generated docs scaffolding) writes to docs/edge/<lang>/* so newly-generated unreleased docs land in Edge and never accidentally touch a frozen snapshot. Migration scripts (one-shot): - scripts/docs/freeze_historical_versions.py reconstructs all 16 historical snapshots (v1.10.0 .. v1.14.7) from git tags via git archive | tar, rewriting openapi: MDX refs so each snapshot reads its own enterprise-api YAML rather than the live one. - scripts/docs/prefix_version_paths.py one-shot-migrates docs.json: rewrites every page path in 16 versioned blocks to point under docs/v<X.Y.Z>/, inserts a new Edge entry per language, tags v1.14.7 as Latest (default), prunes pages whose target file doesn't exist in the snapshot (e.g. docs/ar/ didn't exist before v1.12.0), and writes the wildcard + per-section redirects. - scripts/docs/freeze_current_edge.py is now a thin CLI wrapper around docs_versioning.freeze for manual one-off freezes (e.g. retroactively snapshotting a forgotten release). CI guards (.github/workflows/docs-snapshots.yml): - Frozen snapshots under docs/v[0-9]*/ are immutable; only PRs whose title contains [docs-freeze] (i.e. release-cut PRs generated by devtools release or the manual wrapper) may modify them. - Images under docs/images/ are append-only since snapshots share a single image directory. Deleting or renaming an image breaks every historical snapshot that still references it. Restored docs/images/crewai-otel-export.png from PR #3673; it was deleted in PR #4908 but v1.10.0 / v1.10.1 snapshots still reference it. Restoring instead of editing the snapshots preserves historical rendering fidelity and validates the new append-only rule retroactively. Tests: - lib/devtools/tests/test_docs_versioning.py covers the freeze: file copy, openapi rewrite, version insertion, default demotion, redirect upserts, per-section redirect rewriting, idempotency, and invalid inputs. Verified locally with mintlify broken-links: 0 broken links across the full site (Edge + 16 frozen versions, 4 locales). AGENTS.md (repo root) is the contributor guide for the new model; RELEASING.md is the release-cut runbook; README's Contribution section links to both. Co-authored-by: Cursor <cursoragent@cursor.com> * style: resolve linter issues --------- Co-authored-by: Cursor <cursoragent@cursor.com> |
||
|
|
3a52919a35 | chore(devtools): drop self-explanatory comments | ||
|
|
259d334e38 | chore(devtools): skip pinning crewai-files in file-processing extra | ||
|
|
ba523f46c0 | fix(devtools): include all workspace packages in bump pin rewrites | ||
|
|
8bae740899 |
fix: use regex for template pyproject.toml version bumps
tomlkit.parse() fails on Jinja placeholders like {{folder_name}}
in CLI template files. Switch to regex replacement for templates.
|
||
|
|
fc9280ccf6 | refactor: replace regex with tomlkit in devtools CLI |