refactor(runtime): extract tool call argument boundary - #4971
Conversation
4a6b357 to
ef9da46
Compare
ef9da46 to
66f2b36
Compare
66f2b36 to
36feaa7
Compare
Why this extraction existsThis change is not intended to create four independently transformed or redacted copies of every tool argument. The four names describe different consumers of the same call data:
For ordinary tools these values may be identical. They diverge when a tool has a permission projection, and Computer Use additionally applies its existing privacy and accepted-field-name projection before persistence/model replay. The extraction gives that existing relationship one internal owner. Previously it lived inline in A separate module is used because this is a pure data boundary with no This is also intentionally independent of #4879. It does not change Measured production change: |
|
@Astro-Han could you please review this specifically against the direction of #4879? The intended boundary is entirely before transcript publication: it extracts the existing argument snapshot, declared validation, permission projection and persisted/model-facing projection, while leaving |
Refs #4908
Refs #4909
Summary
This is the pre-#4879 call-data slice of A06.
It extracts the existing tool-call argument snapshot, declared-schema validation, permission projection, and Computer Use model-facing projection into one small internal module. The public ToolRuntime API and execution pipeline remain unchanged.
The slice intentionally does not touch transcript/message ownership or common-field construction. In particular, it does not change
appendMessage,ToolCallMessage,ToolResultMessage, RuntimeEvent schemas, T1/T2, or thesession_messagespublication path. This keeps the change independent of #4879, which is converging ordinary transcript facts on RuntimeEvent plus a projector.What is preserved
Measurements
tool-runtime.ts: 4,197 baseline lines on current main; 4,086 after extraction.computer-use-tools.ts: unchanged at 2,871 lines.tool-runtime.tsis reported as extraction; no unsupported net-deletion claim is made.Verification
Using Node 24.19.0:
git diff --checkpassed;The full workspace test suite was not run because this PR is intentionally limited to the Runtime call-data seam.