Skip to content

feat: export agentkit result APIs - #185

Merged
delete-cloud merged 1 commit into
mainfrom
feat/agentkit-result-public-exports
May 16, 2026
Merged

delete-cloud merged 1 commit into
mainfrom
feat/agentkit-result-public-exports

Conversation

@delete-cloud

@delete-cloud delete-cloud commented May 16, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • Export agentkit result models and reducers from the package-level API
  • Export ArtifactStore from agentkit.storage
  • Add public export regression tests

Verification

  • uv run pytest tests/agentkit/test_public_exports.py tests/agentkit/result tests/agentkit/storage/test_protocols.py -q
  • uv run basedpyright --level error src/agentkit/init.py src/agentkit/storage/init.py tests/agentkit/test_public_exports.py
  • uv run ruff format --check src/agentkit/init.py src/agentkit/storage/init.py tests/agentkit/test_public_exports.py
  • uv run ruff check src/agentkit/init.py src/agentkit/storage/init.py tests/agentkit/test_public_exports.py
  • git diff --check

Summary by CodeRabbit

Release Notes

  • New Features

    • Storage protocol ArtifactStore and result model symbols are now directly accessible from the agentkit module, streamlining imports and improving API discoverability.
  • Tests

    • Added comprehensive test coverage for public module exports to ensure API stability.

Review Change Stack

@coderabbitai

coderabbitai Bot commented May 16, 2026 •

Copy link
Copy Markdown
Contributor
📝 Walkthrough

Walkthrough

The 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.

Changes

Public API Re-exports

Layer / File(s) Summary
Storage Protocol Re-export
coding-agent/src/agentkit/storage/__init__.py
ArtifactStore is imported from agentkit.storage.protocols and added to the module's __all__ export list.
Main Package Result and Storage Exports
coding-agent/src/agentkit/__init__.py
ArtifactStore is imported from storage, and result models/functions (ArtifactRef, FailureSummary, ResultRef, SessionResult, TurnResult, VerificationSummary, latest_turn_result, result_from_turn_trace, verification_summary_from_turn_trace) are imported from agentkit.result. The module's __all__ is updated to expose all these symbols at the package level.
Public Export Verification Tests
coding-agent/tests/agentkit/test_public_exports.py
New test file asserts that expected model class names and callable helper functions are present in agentkit exports, and that ArtifactStore is exported from agentkit.storage.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Possibly related PRs

  • delete-cloud/Coding-Agent-Loop#179: Adds agentkit public exports for result/artifact reference models and reducer helper functions (latest_turn_result, result_from_turn_trace, verification_summary_from_turn_trace, plus ArtifactRef/ResultRef), which directly aligns with this PR's plan for agentkit-owned session/turn result extraction reducers and reference types.

Poem

🐰 Exports bloom bright where artifacts rest,
Storage and results all put to the test,
Public API grows with a hop and a bound,
Where ArtifactStore and summaries are found,
Now every importer can see what they seek!

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: exporting result APIs from the agentkit package, which aligns with the primary objectives.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/agentkit-result-public-exports

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 win

Add assertions for all newly exported root symbols.

Line 14–15 checks two helper exports, but the new root exports latest_turn_result and ArtifactStore are 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

📥 Commits

Reviewing files that changed from the base of the PR and between 1047a17 and f906afc.

📒 Files selected for processing (3)
  • coding-agent/src/agentkit/__init__.py
  • coding-agent/src/agentkit/storage/__init__.py
  • coding-agent/tests/agentkit/test_public_exports.py

@delete-cloud
delete-cloud merged commit 34d072a into main May 16, 2026
1 check passed
@delete-cloud
delete-cloud deleted the feat/agentkit-result-public-exports branch May 16, 2026 07:20
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.

1 participant