Feat/1017 migrate typed refs#43
Merged
Skobeltsyn merged 2 commits intomainfrom May 5, 2026
Merged
Conversation
…ate string overload
Migrate ~35 test files and 4 user-facing demos (swarmdemo agents +
InteractiveLiveShowDemo) from `tools("name")` string form to typed
`tools(handle)` form using `lateinit var` declarations inside the
`agent { }` block. Updates docs/model-and-tools.md examples to lead
with the typed form.
Add `@Deprecated(level = WARNING, ReplaceWith)` to `Skill.tools(vararg names: String)`.
New overload: `Skill.tools()` (no-arg) marks a skill agentic with no
allowlisted tools — disambiguates from the deprecated string-vararg
form so existing `tools()` empty calls don't fire the warning.
Files explicitly NOT migrated (legitimate string-form use):
- UnknownToolNameValidationTest, SkillFreezeTest, AgenticSkillTest —
test the string API directly or test missing-tool detection. File-level
@Suppress("DEPRECATION").
- ReservedMemoryToolNamesTest — references reserved built-in names that
can't have a user `Tool` handle. File-level suppression.
- Mixed user+built-in tests (EscalateToolTest, ThrowExceptionIntegrationTest,
JsonParseEscalationIntegrationTest, AgentMemoryTest) — per-method
suppression where built-in tools (escalate, throwException, memory_*)
appear; user-only methods migrated to typed form.
- AgentFibonacciMcpTest, AgentMcpToolUseTest — MCP tool names discovered
at runtime; per-call suppression with reasoning.
- TypedToolRefsTest — single string-form test method retained for the
side-by-side comparison with the typed test.
Verified: zero deprecation warnings from project code, full test suite
green.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…at note README "What's in the Box" calls out the typed `tools(handle)` form and the soft-deprecation of the string overload. CHANGELOG Unreleased section retargeted at 0.3.0 with an explicit "Binary compatibility" subsection: source-compatible (existing code compiles unchanged), binary-incompatible (`tool(...)` builders return `Tool<...>` instead of `Unit` — consumers must recompile). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
d0fdd80 to
c00cb90
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.