Some checks failed
CLI Tests / test-cli (push) Has started running
Cross-Node Transaction Testing / transaction-test (push) Successful in 2s
Deploy to Testnet / deploy-testnet (push) Successful in 1m9s
Documentation Validation / validate-docs (push) Failing after 9s
Documentation Validation / validate-policies-strict (push) Successful in 4s
Multi-Node Stress Testing / stress-test (push) Successful in 3s
Node Failover Simulation / failover-test (push) Successful in 2s
Security Scanning / security-scan (push) Successful in 29s
- Update all command module docstrings to consistent format ending with "for AITBC CLI" - Remove unused imports (json, httpx, pydantic) from multiple command modules - Reorder imports to group utils imports together - Change sys.path in click_cli.py from /opt/aitbc to /opt/aitbc/cli - Fix relative imports in cross_chain.py and ipfs.py to use .config
60 lines
1.5 KiB
Python
60 lines
1.5 KiB
Python
"""Plugin marketplace commands for AITBC CLI"""
|
|
|
|
import click
|
|
from utils import output, error, success, warning
|
|
|
|
|
|
@click.group()
|
|
def plugin():
|
|
"""Plugin marketplace and management commands"""
|
|
pass
|
|
|
|
|
|
@plugin.command()
|
|
@click.option("--name", required=True, help="Plugin name")
|
|
@click.option("--version", required=True, help="Plugin version")
|
|
@click.option("--description", help="Plugin description")
|
|
@click.option("--file", type=click.Path(exists=True), help="Plugin file")
|
|
def publish(name: str, version: str, description: str, file: str):
|
|
"""Publish plugin to marketplace"""
|
|
import uuid
|
|
output({
|
|
"plugin_id": f"plugin_{uuid.uuid4().hex[:16]}",
|
|
"name": name,
|
|
"version": version,
|
|
"description": description or "",
|
|
"status": "published"
|
|
})
|
|
|
|
|
|
@plugin.command()
|
|
@click.option("--category", help="Filter by category")
|
|
@click.option("--status", help="Filter by status")
|
|
def list(category: str, status: str):
|
|
"""List available plugins"""
|
|
output({
|
|
"plugins": [],
|
|
"category": category or "all",
|
|
"status": status or "all"
|
|
})
|
|
|
|
|
|
@plugin.command()
|
|
@click.option("--plugin-id", required=True, help="Plugin ID")
|
|
def install(plugin_id: str):
|
|
"""Install plugin"""
|
|
output({
|
|
"plugin_id": plugin_id,
|
|
"status": "installed"
|
|
})
|
|
|
|
|
|
@plugin.command()
|
|
@click.option("--plugin-id", required=True, help="Plugin ID")
|
|
def uninstall(plugin_id: str):
|
|
"""Uninstall plugin"""
|
|
output({
|
|
"plugin_id": plugin_id,
|
|
"status": "uninstalled"
|
|
})
|