Skip to content

refactor(tools): move GetToolSpec presentation contracts#785

Merged
limityan merged 1 commit into
GCWing:mainfrom
limityan:yanzhn/refactor-p20-tool-manifest-boundary
May 19, 2026
Merged

refactor(tools): move GetToolSpec presentation contracts#785
limityan merged 1 commit into
GCWing:mainfrom
limityan:yanzhn/refactor-p20-tool-manifest-boundary

Conversation

@limityan
Copy link
Copy Markdown
Collaborator

Summary

  • Move pure GetToolSpec presentation contracts into bitfun-agent-tools: prompt description, input schema, validation, assistant-detail rendering, collapsed-tool catalog entry formatting, and duplicate-load hint text.
  • Keep runtime ownership unchanged in bitfun-core: GetToolSpecTool, context-aware collapsed-tool discovery, ToolUseContext.unlocked_collapsed_tools, manifest resolver, registry snapshot, and concrete tools still stay in core.
  • Extend owner-crate contract tests, strengthen scripts/check-core-boundaries.mjs, and update the decomposition docs plus core AGENTS guidance to reflect the boundary.

Safety / behavior boundary

  • No tool execution path, runtime manifest assembly, unlock state, concrete tool implementation, or feature behavior is moved.
  • Core only delegates stateless rendering/schema/validation helpers to the owner crate, preserving the existing prompt text, schema shape, duplicate-load result, and assistant XML-section escaping behavior.
  • Rebased against GCWing/main (b7a289b0) before opening the PR.

Validation

  • cargo test -p bitfun-agent-tools
  • cargo test -p bitfun-core get_tool_spec --lib
  • cargo test -p bitfun-core manifest_ --lib
  • cargo check -p bitfun-core --features product-full
  • node scripts/check-core-boundaries.mjs
  • git diff --check

@limityan limityan merged commit a8e4f05 into GCWing:main May 19, 2026
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