The records of tool calls, by tool_call_id.
Functions#
begin#
begin(tool_call_id, tool_name) -> Effect[Begun, ToolLedgerError]Record the intent to run tool_call_id, atomically, unless the ledger has it:
Claimed when this call recorded it, else the entry it found.
| Parameter | Type | Description |
|---|---|---|
tool_call_id | str | |
tool_name | str |
Returns Effect[Begun, ToolLedgerError]
@abstractmethod
def begin(self, tool_call_id: str, tool_name: str) -> Effect[Begun, ToolLedgerError]:
"""Record the intent to run ``tool_call_id``, atomically, unless the ledger has it:
``Claimed`` when this call recorded it, else the entry it found."""complete#
complete(tool_call_id, outcome) -> Effect[None, ToolLedgerError]Record the call's outcome.
| Parameter | Type | Description |
|---|---|---|
tool_call_id | str | |
outcome | Outcome |
Returns Effect[None, ToolLedgerError]
@abstractmethod
def complete(self, tool_call_id: str, outcome: Outcome) -> Effect[None, ToolLedgerError]:
"""Record the call's ``outcome``."""lookup#
lookup(tool_call_id) -> Effect[Entry | None, ToolLedgerError]The call's entry, if any.
| Parameter | Type | Description |
|---|---|---|
tool_call_id | str |
Returns Effect[Entry | None, ToolLedgerError]
@abstractmethod
def lookup(self, tool_call_id: str) -> Effect[Entry | None, ToolLedgerError]:
"""The call's entry, if any."""