Skip to content

refactor(runtime): move tool context owner boundary#884

Merged
limityan merged 1 commit into
GCWing:mainfrom
limityan:yanzhn/hr-a-tool-runtime-owner
May 26, 2026
Merged

refactor(runtime): move tool context owner boundary#884
limityan merged 1 commit into
GCWing:mainfrom
limityan:yanzhn/hr-a-tool-runtime-owner

Conversation

@limityan
Copy link
Copy Markdown
Collaborator

@limityan limityan commented May 26, 2026

Summary

  • Move the core-owned ToolUseContext type, portable facts projection, runtime/service bindings, and unified Tool::call runtime hook facade into tool_context_runtime.rs.
  • Keep framework.rs as the compatibility re-export + Tool trait boundary only; move the Deep Review post-call hook regression into the runtime owner tests.
  • Update core runtime/adapter modules to import ToolUseContext from the owner module instead of relying on the framework re-export.
  • Extend boundary checks and docs so future tool runtime work keeps runtime hook wiring, context owner state, and internal imports aligned with tool_context_runtime.rs.

Behavior boundary

  • No tool names, schemas, manifest ordering, GetToolSpec behavior, collapsed unlock lifecycle, snapshot wrapper, concrete IO, or feature flags changed.
  • ToolUseContext remains core-owned; workspace services, cancellation token, Deep Review hooks, dynamic MCP execution, Read/Edit/Write IO, and tool-result filesystem persistence are not moved out of core.
  • Latest main was rebased after Improve goal mode guidance (#883); that change touches goal-mode/coordinator code and does not alter this HR-A tool-runtime owner plan.

Verification

  • node scripts\\check-core-boundaries.mjs
  • node scripts\\check-core-boundaries.mjs --self-test
  • cargo test -p bitfun-core tool_context -- --nocapture
  • cargo test -p bitfun-core tool_call_runtime_hook -- --nocapture
  • cargo test -p bitfun-core call_records_deep_review_read_file_measurement_without_touching_result -- --nocapture
  • cargo test -p bitfun-core product_tool -- --nocapture
  • cargo test -p bitfun-core manifest -- --nocapture
  • cargo test -p bitfun-agent-tools
  • cargo check -p bitfun-core --features product-full
  • cargo check --workspace
  • cargo test --workspace
  • git diff --check

@limityan limityan force-pushed the yanzhn/hr-a-tool-runtime-owner branch from 8ab5f6a to bcc7f78 Compare May 26, 2026 03:43
@limityan limityan merged commit 4192398 into GCWing:main May 26, 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