Repository navigation
feat: export agentkit result APIs - #185
Conversation
📝 WalkthroughWalkthroughThe PR extends the agentkit package's public API to re-export storage protocols and result models. ArtifactStore is added to agentkit.storage exports, and result symbols (artifact references, session/turn results, verification/failure summaries, and helper functions) are re-exported at the agentkit root level. Tests verify the stable public exports. ChangesPublic API Re-exports
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
coding-agent/tests/agentkit/test_public_exports.py (1)
7-20:⚠️ Potential issue | 🟡 Minor | ⚡ Quick winAdd assertions for all newly exported root symbols.
Line 14–15 checks two helper exports, but the new root exports
latest_turn_resultandArtifactStoreare not asserted. This leaves part of the new public API unguarded.Suggested test update
def test_agentkit_exports_result_models_and_reducers() -> None: + assert agentkit.ArtifactStore.__name__ == "ArtifactStore" assert agentkit.ArtifactRef.__name__ == "ArtifactRef" assert agentkit.ResultRef.__name__ == "ResultRef" assert agentkit.TurnResult.__name__ == "TurnResult" assert agentkit.SessionResult.__name__ == "SessionResult" assert agentkit.VerificationSummary.__name__ == "VerificationSummary" assert agentkit.FailureSummary.__name__ == "FailureSummary" + assert callable(agentkit.latest_turn_result) assert callable(agentkit.result_from_turn_trace) assert callable(agentkit.verification_summary_from_turn_trace)🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@coding-agent/tests/agentkit/test_public_exports.py` around lines 7 - 20, Update the test to assert the new public exports: add an assertion that agentkit.latest_turn_result is callable (or has the expected __name__ if it's a value) and ensure ArtifactStore is asserted from the agentkit root (verify ArtifactStore.__name__ == "ArtifactStore" or reference via agentkit.ArtifactStore if that was the intended root export); modify test_agentkit_exports_result_models_and_reducers to include agentkit.latest_turn_result and/or adjust test_agentkit_storage_exports_artifact_store to reference agentkit.ArtifactStore so both new root symbols are explicitly checked.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Outside diff comments:
In `@coding-agent/tests/agentkit/test_public_exports.py`:
- Around line 7-20: Update the test to assert the new public exports: add an
assertion that agentkit.latest_turn_result is callable (or has the expected
__name__ if it's a value) and ensure ArtifactStore is asserted from the agentkit
root (verify ArtifactStore.__name__ == "ArtifactStore" or reference via
agentkit.ArtifactStore if that was the intended root export); modify
test_agentkit_exports_result_models_and_reducers to include
agentkit.latest_turn_result and/or adjust
test_agentkit_storage_exports_artifact_store to reference agentkit.ArtifactStore
so both new root symbols are explicitly checked.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: 1d57a8aa-de27-49a4-a269-2049fa4cf73d
📒 Files selected for processing (3)
coding-agent/src/agentkit/__init__.pycoding-agent/src/agentkit/storage/__init__.pycoding-agent/tests/agentkit/test_public_exports.py
Summary
Verification
Summary by CodeRabbit
Release Notes
New Features
ArtifactStoreand result model symbols are now directly accessible from the agentkit module, streamlining imports and improving API discoverability.Tests