Repository navigation
feat(rules): extend EBTE tool-call claims to six more SDKs (schemas 33–36) - #281
Merged
Merged
Conversation
A tool built with StructuredTool.from_function(fn), StructuredTool(func=fn) or Tool.from_function(fn) now gets the claim_use fact from its wrapped function, so LC-029 and LC-030 apply to it. No decorator registers a factory-built tool, so any decorator on the wrapped function makes the fact wrapped (wrappedFuncClaimUse). A decorated wrapped function is found by a separate lookup so the other users of indexTopLevelFunctions resolve exactly what they did before. No schema change.
CREW-016..018 and PYD-016..018 apply the tool-call claim rungs (no claim, claim never read, claim only written out) to CrewAI and Pydantic AI tools. ApplyClaimMediators marks a claim as possibly mediated when the repo registers the SDK pre-tool hook (CrewAI before_tool_call family, Pydantic AI Hooks tool-execution hooks, or a tool args_validator=). Pydantic AI Tool(fn) factories now get the claim fact from the wrapped function.
CSDK-026..028 apply the tool-call claim rungs to Python Claude Agent SDK @tool handlers. The handler takes one args dict, so discovery records the input schema keys in ToolDef.InputKeys (short dict, JSON-schema properties, or a same-file TypedDict or dict) and classifies args["claim"] / args.get("claim") reads. A PreToolUse hooks entry, or can_use_tool on an options call without allowed_tools or bypassPermissions, counts as a possible mediator.
OAI-037..039 apply the tool-call claim rungs to @openai/agents tool({...})
definitions whose zod parameters declare claim. stampTSOpenAIClaim reads the
inline execute function: a destructured binding ({ claim }, { claim: c }) or
input.claim / input["claim"]. A tool with inputGuardrails counts as possibly
mediated.
ADK-024..026 over FunctionTool(fn) and AG2-023..025 over register_function and register_for_llm / register_for_execution tools, with the claim fact taken from the wrapped function. The AutoGen registering decorators are not counted as mediators. An ADK before_tool_callback (agent keyword or plugin method) anywhere in the repo marks ADK claims as possibly mediated.
The tool_claim_use schema reference and the FactClaimUse comment still said only Python decorated tools carry the fact and that absent reads only param_names.
This was referenced Oct 27, 2026
sairenchristianbuerano
approved these changes
Oct 28, 2026
ericksondelacruz
changed the base branch from
feat/analyzer-ebte-claims
to
main
October 28, 2026 02:49
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.
Summary
Extends EBTE (Explanation-Bound Tool Execution) tool-call claims from #276 (OpenAI Agents, MCP, LangChain; Python) to six more SDKs. Each SDK gets the same three rules: no claim (info), claim declared but never read (medium), claim only printed, logged, serialized or returned (medium). Stacks on #276 and adds 18 rules, from 364 to 382.
StructuredTool.from_function(fn),StructuredTool(func=fn),Tool.from_function(fn)) get theclaim_usefact from the wrapped function, so LC-029 / LC-030 apply to themclaim_useon CrewAI and Pydantic AI tools. New repo-level passanalysis.ApplyClaimMediatorstreats the SDK's pre-tool hook (CrewAIbefore_tool_callfamily, Pydantic AI tool-executionHooks, a toolargs_validator=) as a possible mediator@toolhandlers. NewToolDef.InputKeysrecords the input-schema keys, sotool_claim_usesees a claim in the schema and classifiesargs["claim"]/args.get("claim")reads. APreToolUsehook, orcan_use_toolwithoutallowed_tools/bypassPermissions, counts as a possible mediator@openai/agentstool({...})with a zodclaimparameter. Reads destructured bindings andinput.claimin the inlineexecute.inputGuardrailscounts as a possible mediatorFunctionTool(fn)and AutoGenregister_function/register_for_llm/register_for_executiontools. An ADKbefore_tool_callback(agent keyword or plugin method) counts as a possible mediator. AutoGen's registering decorators do notFactClaimUsecomment describe every discovery path and mediatorEach commit bumps
SupportedSchemaVersionand the fixture manifest, with a schema note ininternal/rules/schema_version.go.Notes for review
feat/analyzer-ebte-claims. Branches aren't deleted on merge in this repo, so after feat(rules): detect missing EBTE tool-call claims and mediation (schema 32) #276 merges, change this PR's base tomain(or delete the parent branch, and GitHub retargets it). CI only runs on PRs intomain, so the checks start after the retarget.feat/ebte-claims-coverage). Their CI pairs with this branch. Merge order: this PR, then feat(tool_call_claims): EBTE tool-call claims for six more SDKs (schemas 33–36) agent-reliability-rules#206, then docs(tool_call_claims): rationale for the EBTE claims rules on six more SDKs trustabl-rulebook#157.mainfirst means renumbering this stack.Test plan
go build ./...,go vet ./...,go test ./...(27 packages ok) on every commit;go test -raceoninternal/analysis,internal/rulesandinternal/scannerat the tipscripts/check-rules-sync.shagainst the rules branch: in sync (144 files)trustabl rules validateon the rules branch:OK: 143 rule pack(s), 382 rule(s) valid under rule schema version 36