commands
Class info¶
Classes¶
| Name | Children | Inherits |
|---|---|---|
| Command aclientp.schema.v2.commands A slash command the user invokes by including ``/name`` in a prompt. |
||
| Skill aclientp.schema.v2.commands **UNSTABLE**: An Agent Skill the user invokes with a ``skill`` content block. |
||
| TextCommandInput aclientp.schema.v2.commands All text typed after the command name (and the following whitespace) is the input. |
||
| UnknownCommand aclientp.schema.v2.commands A custom or future command kind; ``type`` values starting with ``_`` are extensions. |
||
| UnknownCommandInput aclientp.schema.v2.commands A custom or future input kind; ``type`` values starting with ``_`` are extensions. |
🛈 DocStrings¶
v2 available commands: slash commands and skills the agent advertises.
AvailableCommand
module-attribute
¶
AvailableCommand = Annotated[
Annotated[Command, Tag("command")]
| Annotated[Skill, Tag("skill")]
| Annotated[UnknownCommand, Tag(OTHER_TAG)],
Discriminator(open_discriminator("type", frozenset({"command", "skill"}))),
]
A command the agent advertises to the client.
AvailableCommandInput
module-attribute
¶
AvailableCommandInput = Annotated[
Annotated[TextCommandInput, Tag("text")] | Annotated[UnknownCommandInput, Tag(OTHER_TAG)],
Discriminator(open_discriminator("type", frozenset({"text"}))),
]
How a command takes input.
Command
¶
Bases: AnnotatedObject
A slash command the user invokes by including /name in a prompt.
Source code in src/aclientp/schema/v2/commands.py
input
class-attribute
instance-attribute
¶
input: AvailableCommandInput | MISSING | None = MISSING
The command's input; omitted means it takes none.
name
instance-attribute
¶
Command name without the leading /, e.g. create_plan; no whitespace.
Skill
¶
Bases: AnnotatedObject
UNSTABLE: An Agent Skill the user invokes with a skill content block.
Agents MUST only send skills to clients that advertise session.commands.skill.
Source code in src/aclientp/schema/v2/commands.py
path
class-attribute
instance-attribute
¶
path: AbsolutePath | MISSING | None = MISSING
Absolute path of the file defining the skill (normally its SKILL.md) on the
agent's machine.
TextCommandInput
¶
Bases: AnnotatedObject
All text typed after the command name (and the following whitespace) is the input.
Source code in src/aclientp/schema/v2/commands.py
UnknownCommand
¶
Bases: Unknown
A custom or future command kind; type values starting with _ are extensions.