Skip to content

Add batch read tools and bump colony-sdk to 1.7.1#19

Merged
jackparnell merged 4 commits intomainfrom
feature/batch-tools-and-sdk-bump
Apr 12, 2026
Merged

Add batch read tools and bump colony-sdk to 1.7.1#19
jackparnell merged 4 commits intomainfrom
feature/batch-tools-and-sdk-bump

Conversation

@ColonistOne
Copy link
Copy Markdown
Collaborator

@ColonistOne ColonistOne commented Apr 12, 2026

Summary

  • Adds ColonyGetPostsByIds and ColonyGetUsersByIds — wraps the batch endpoints that landed in colony-sdk 1.7.0 (get_posts_by_ids / get_users_by_ids). Crews can now fan out known-ID lookups in one call instead of N sequential colony_get_posts. Both wired into READ_TOOLS so they ship automatically with ColonyToolkit / AsyncColonyToolkit. Tool count is now 33 (15 read + 18 write), up from 31.
  • Bumps the colony-sdk floor to >=1.7.1 (skipping the brief 1.7.0 dict | Model return-type union that broke downstream mypy runs — see colony-sdk-python 1.7.1 release notes).
  • Adds a [dev] optional-deps extra so pip install -e ".[dev]" resolves the full dev/test toolchain in one command, matching the pattern in langchain-colony and smolagents-colony.
  • CI workflow tidied to match — named jobs, explicit permissions: contents: read, install steps now use pip install -e ".[dev]". Same matrix, same triggers, no behaviour change.

Compatibility

Fully backward compatible. The two new tools are additive; the SDK bump from 1.5.0 → 1.7.1 is safe (1.7.1 explicitly reverted the only breaking change from 1.7.0).

Test plan

  • pytest -q214 tests pass (was 204; 10 new tests covering the two batch tools: happy path, empty result, defensive non-list response, typed-error formatting, native-async dispatch)
  • pytest --cov=crewai_colony100% line coverage held across all 6 source files
  • mypy src/ — clean
  • ruff check src/ tests/ — clean
  • ruff format --check src/ tests/ — clean
  • Fresh pip install -e ".[dev]" resolves cleanly in a brand-new venv

🤖 Generated with Claude Code

Adds the two batch read tools that landed in colony-sdk 1.7.0
(`get_posts_by_ids` / `get_users_by_ids`) so crews can fan out
known-ID lookups in one call instead of N sequential `get_post`s.

- ColonyGetPostsByIds  → colony_get_posts_by_ids
- ColonyGetUsersByIds  → colony_get_users_by_ids

Both wired into READ_TOOLS so they ship automatically with
ColonyToolkit / AsyncColonyToolkit. Tool count is now 33 (15 read +
18 write), up from 31.

Bumps the colony-sdk floor to >=1.7.1 (skipping the brief 1.7.0
`dict | Model` return-type union that broke downstream mypy runs).

Adds a `[dev]` optional-deps extra so `pip install -e ".[dev]"`
resolves the full dev/test toolchain in one command, matching the
pattern used by langchain-colony and smolagents-colony.

214 tests (was 204), 100% line coverage held. mypy clean.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@codecov
Copy link
Copy Markdown

codecov bot commented Apr 12, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

ColonistOne and others added 3 commits April 12, 2026 17:22
Brings the CI workflow in line with langchain-colony and
smolagents-colony:

- Named jobs for clearer GitHub UI (lint / typecheck /
  Test (Python X.Y)).
- Explicit `permissions: contents: read` at the top level.
- Install steps switched from listing dependencies inline
  (`pip install mypy colony-sdk crewai`,
   `pip install colony-sdk crewai pytest pytest-asyncio pytest-cov`)
  to `pip install -e ".[dev]"`, which now resolves the full toolchain
  in one step thanks to the [dev] extra added in the previous commit.

No behaviour change — the same jobs run with the same Python matrix
on the same triggers. Pure tidy-up.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The CI workflow standardisation landed in the previous commit
after all, so put the changelog entry back.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Branch protection on main requires status contexts named
`test (3.10)` / `test (3.11)` / `test (3.12)` / `test (3.13)` —
the lowercase, auto-generated form GitHub produces from a matrix
when no explicit `name:` is set.

The previous commit added `name: Test (Python ${{ matrix.python-version }})`
which produced contexts like `Test (Python 3.10)` instead, and those
weren't matching the required-status-checks list. PR #19 was sitting
green-but-blocked because the required contexts were never reported.

Fix: drop the `name:` line and let the matrix generate the expected
contexts. Added a comment so the next person who tries to "tidy up"
the job name doesn't repeat the same mistake.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@jackparnell jackparnell merged commit f6446e4 into main Apr 12, 2026
7 checks passed
@jackparnell jackparnell deleted the feature/batch-tools-and-sdk-bump branch April 12, 2026 17:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants