Coverage for src / agent / commands / __init__.py: 100%
5 statements
« prev ^ index » next coverage.py v7.13.0, created at 2025-12-11 14:30 +0000
« prev ^ index » next coverage.py v7.13.0, created at 2025-12-11 14:30 +0000
1# Copyright 2025-2026 Microsoft Corporation
2#
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7# http://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
15"""Slash commands system for OSDU Agent.
17This package provides discoverable, auto-completing slash commands for
18interactive mode. Commands are defined as .md files with YAML frontmatter
19and markdown prompt templates.
21Usage:
22 >>> from agent.commands import SlashCommandLoader, SlashCommandRegistry
23 >>> loader = SlashCommandLoader(settings)
24 >>> registry = SlashCommandRegistry()
25 >>> for cmd in loader.discover_commands():
26 ... registry.register(cmd)
27 >>> registry.get_completions()
28 ['/clone']
29"""
31from agent.commands.executor import SlashCommandExecutor
32from agent.commands.loader import SlashCommandLoader
33from agent.commands.manifest import SlashCommandError, SlashCommandManifest
34from agent.commands.registry import SlashCommandRegistry
36__all__ = [
37 "SlashCommandLoader",
38 "SlashCommandManifest",
39 "SlashCommandRegistry",
40 "SlashCommandExecutor",
41 "SlashCommandError",
42]