Skip to content

CommandPermissionSubject

Base classes

Name Children Inherits
AnnotatedObject
aclientp.schema.v2.base
A v2 object with the ``_meta`` extension point.

⋔ Inheritance diagram

graph TD
  95970870973664["permissions.CommandPermissionSubject"]
  95970868359040["base.AnnotatedObject"]
  95970855946400["base.Schema"]
  95970851503232["main.BaseModel"]
  125067848591872["builtins.object"]
  95970868359040 --> 95970870973664
  95970855946400 --> 95970868359040
  95970851503232 --> 95970855946400
  125067848591872 --> 95970851503232

🛈 DocStrings

Bases: AnnotatedObject

Permission is requested before running a command.

Source code in src/aclientp/schema/v2/permissions.py
class CommandPermissionSubject(AnnotatedObject):
    """Permission is requested before running a command."""

    type: Literal["command"] = Field(default="command", init=False)

    command: str
    """The command that runs if permission is granted."""

    cwd: AbsolutePath
    """Absolute working directory of the command."""

    tool_call_id: ToolCallId | MISSING | None = MISSING
    """The associated tool call, when known."""

    terminal_id: TerminalId | MISSING | None = MISSING
    """The associated terminal, when already known."""

command instance-attribute

command: str

The command that runs if permission is granted.

cwd instance-attribute

Absolute working directory of the command.

terminal_id class-attribute instance-attribute

terminal_id: TerminalId | MISSING | None = MISSING

The associated terminal, when already known.

tool_call_id class-attribute instance-attribute

tool_call_id: ToolCallId | MISSING | None = MISSING

The associated tool call, when known.

:fa-brands-github: Show source on GitHub