Skip to content

Feat/1017 migrate typed refs#43

Merged
Skobeltsyn merged 2 commits intomainfrom
feat/1017-migrate-typed-refs
May 5, 2026
Merged

Feat/1017 migrate typed refs#43
Skobeltsyn merged 2 commits intomainfrom
feat/1017-migrate-typed-refs

Conversation

@Skobeltsyn
Copy link
Copy Markdown
Contributor

No description provided.

Skobeltsyn and others added 2 commits May 5, 2026 12:52
…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>
@Skobeltsyn Skobeltsyn force-pushed the feat/1017-migrate-typed-refs branch from d0fdd80 to c00cb90 Compare May 5, 2026 09:53
@Skobeltsyn Skobeltsyn merged commit c00cb90 into main May 5, 2026
3 of 4 checks passed
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