id: str

The unique ID of the apply patch tool call. Populated when this item is returned via API.

call_id: str

The unique ID of the apply patch tool call generated by the model.

operation: Operation

One of the create_file, delete_file, or update_file operations applied via apply_patch.

One of the following:
class OperationCreateFile: …

Instruction describing how to create a file via the apply_patch tool.

diff: str

Diff to apply.

path: str

Path of the file to create.

type: Literal["create_file"]

Create a new file with the provided diff.

class OperationDeleteFile: …

Instruction describing how to delete a file via the apply_patch tool.

path: str

Path of the file to delete.

type: Literal["delete_file"]

Delete the specified file.

class OperationUpdateFile: …

Instruction describing how to update a file via the apply_patch tool.

diff: str

Diff to apply.

path: str

Path of the file to update.

type: Literal["update_file"]

Update an existing file with the provided diff.

status: Literal["in_progress", "completed"]

The status of the apply patch tool call. One of in_progress or completed.

One of the following:
"in_progress"
"completed"
type: Literal["apply_patch_call"]

The type of the item. Always apply_patch_call.

agent: Optional[Agent]

The agent that produced this item.

agent_name: str

The canonical name of the agent that produced this item.

caller: Optional[Caller]

The execution context that produced this tool call.

One of the following:
class CallerDirect: …
type: Literal["direct"]
class CallerProgram: …
caller_id: str

The call ID of the program item that produced this tool call.

type: Literal["program"]
created_by: Optional[str]

The ID of the entity that created this tool call.