Metadata-Version: 2.4
Name: liteyukibot-v7-commands
Version: 0.2.0a2
Summary: Protocol-neutral command routing for LiteyukiBot v7 native plugins.
Author: LiteyukiStudio
License-Expression: LicenseRef-LSO
License-File: LICENSE
Requires-Dist: liteyukibot-v7>=7.0.0a10,<8
Requires-Dist: liteyukibot-v7-permissions>=0.2.0a1,<0.3
Requires-Python: >=3.14
Description-Content-Type: text/markdown

# LiteyukiBot v7 Commands

`liteyukibot-v7-commands` provides the versioned `liteyukibot.commands@1`
service and a protocol-neutral EventBus command router.

The parser recognizes configurable non-empty prefixes, command names, aliases,
and explicit argument/option schemas. Hierarchical subcommand routing remains a
separate alpha step.

```toml
[plugins]
enabled = ["liteyukibot.permissions", "liteyukibot.commands"]

[plugins.config."liteyukibot.commands"]
prefixes = ["/"]
```

Consumers register `CommandSpec` and a synchronous or asynchronous handler.
The handler receives `CommandInvocation`, including the normalized command and
unparsed argument text, and returns the kernel's `HandlerResult`.

```python
from liteyukibot_commands import (
    ArgumentSpec,
    CommandSchema,
    CommandSpec,
    OptionSpec,
    integer_value,
)

spec = CommandSpec(
    "echo",
    schema=CommandSchema(
        arguments=(ArgumentSpec("text"),),
        options=(OptionSpec("times", aliases=("n",), converter=integer_value, default=1),),
    ),
)

def echo(invocation):
    parsed = invocation.parse()
    return invocation.reply(str(parsed.arguments["text"]) * int(parsed.options["times"]))
```

Quoting, escaping, `--name value`, `--name=value`, short aliases, flags,
repeatable options, `--`, and conversion failures have platform-independent
semantics. Parsing errors expose stable codes through `CommandParseError`.
