(
id: str,
name: str,
input: dict[str, Any],
*,
evaluated_permission: str | None = None,
session_thread_id: str | None = None,
)
| 73 | |
| 74 | |
| 75 | def _tool_use( |
| 76 | id: str, |
| 77 | name: str, |
| 78 | input: dict[str, Any], |
| 79 | *, |
| 80 | evaluated_permission: str | None = None, |
| 81 | session_thread_id: str | None = None, |
| 82 | ) -> _StubEvent: |
| 83 | # `evaluated_permission` is always present on the real (typed) event — |
| 84 | # `None` unless the server evaluated a permission policy for the call. |
| 85 | # So is `session_thread_id`, which is `None` for a call of the primary thread. |
| 86 | return _StubEvent( |
| 87 | "agent.tool_use", |
| 88 | id=id, |
| 89 | name=name, |
| 90 | input=input, |
| 91 | evaluated_permission=evaluated_permission, |
| 92 | session_thread_id=session_thread_id, |
| 93 | ) |
| 94 | |
| 95 | |
| 96 | def _tool_result(tool_use_id: str) -> _StubEvent: |
no test coverage detected