applied-cli 0.1.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
applied_cli/main.py ADDED
@@ -0,0 +1,90 @@
1
+ import typer
2
+
3
+ from applied_cli.commands.auth import app as auth_app
4
+ from applied_cli.commands.agent import app as agent_app
5
+ from applied_cli.commands.chat import send as chat_send
6
+ from applied_cli.commands.discover import (
7
+ benchmarks_app,
8
+ conversations_app,
9
+ runs_app,
10
+ scenarios_app,
11
+ )
12
+ from applied_cli.commands.coverage import app as coverage_app
13
+ from applied_cli.commands.fix import app as fix_app
14
+ from applied_cli.commands.insights import app as insights_app
15
+ from applied_cli.commands.intents import app as taxonomy_app
16
+ from applied_cli.commands.responses import app as knowledge_app
17
+ from applied_cli.commands.shop import app as shop_app
18
+ from applied_cli.commands.simulate import app as simulate_app
19
+
20
+ app = typer.Typer(
21
+ help=(
22
+ "Applied Labs CLI for agent-safe workflows.\n\n"
23
+ "Login (requires human approval in browser):\n"
24
+ " applied-cli auth login\n\n"
25
+ "Check status and switch shops:\n"
26
+ " applied-cli auth status\n"
27
+ " applied-cli auth shops\n"
28
+ " applied-cli auth use-shop \"<shop name or uuid>\"\n\n"
29
+ "Then run workflows like:\n"
30
+ " applied-cli chat --agent-id <uuid> --message \"Hello\"\n"
31
+ " applied-cli test fix context --benchmark-id <uuid>\n"
32
+ " applied-cli insights run --query \"top issues\""
33
+ ),
34
+ no_args_is_help=True,
35
+ add_completion=False,
36
+ )
37
+
38
+ # ─────────────────────────────────────────────────────────────────────────────
39
+ # Core
40
+ # ─────────────────────────────────────────────────────────────────────────────
41
+ app.add_typer(auth_app, name="auth", help="Login, logout, switch shops.")
42
+ app.add_typer(shop_app, name="shop", help="Bootstrap new shops from YAML spec.")
43
+ app.add_typer(agent_app, name="agent", help="List, create, update agents.")
44
+
45
+ # ─────────────────────────────────────────────────────────────────────────────
46
+ # Operations
47
+ # ─────────────────────────────────────────────────────────────────────────────
48
+ app.command(
49
+ "chat",
50
+ help=(
51
+ "Send a message to an agent. "
52
+ "Example: applied-cli chat --agent-id <uuid> --message 'Hello'"
53
+ ),
54
+ )(chat_send)
55
+ app.add_typer(conversations_app, name="conversations", help="List, show, import conversations.")
56
+ app.add_typer(insights_app, name="insights", help="Generate analytics reports.")
57
+
58
+ # ─────────────────────────────────────────────────────────────────────────────
59
+ # Knowledge & Configuration
60
+ # ─────────────────────────────────────────────────────────────────────────────
61
+ app.add_typer(knowledge_app, name="knowledge", help="Q&A entries, escalation rules, context.")
62
+ app.add_typer(taxonomy_app, name="taxonomy", help="Topic/intent classification scheme.")
63
+
64
+ # ─────────────────────────────────────────────────────────────────────────────
65
+ # Testing (benchmarks → scenarios → runs)
66
+ # ─────────────────────────────────────────────────────────────────────────────
67
+ test_app = typer.Typer(
68
+ help=(
69
+ "Test agent behavior with benchmarks and scenarios.\n\n"
70
+ "Hierarchy: benchmarks contain scenarios, scenarios have runs.\n"
71
+ "Coverage summarizes scenarios over intents.\n"
72
+ "Fix helps identify and resolve failing scenarios."
73
+ ),
74
+ no_args_is_help=True,
75
+ )
76
+ test_app.add_typer(benchmarks_app, name="benchmarks", help="Scenario collections.")
77
+ test_app.add_typer(scenarios_app, name="scenarios", help="Individual test cases.")
78
+ test_app.add_typer(runs_app, name="runs", help="Scenario execution records.")
79
+ test_app.add_typer(coverage_app, name="coverage", help="Coverage summaries by intent.")
80
+ test_app.add_typer(fix_app, name="fix", help="Fix failing scenarios.")
81
+ app.add_typer(test_app, name="test", help="Benchmarks, scenarios, and fix workflows.")
82
+
83
+ # ─────────────────────────────────────────────────────────────────────────────
84
+ # Simulation
85
+ # ─────────────────────────────────────────────────────────────────────────────
86
+ app.add_typer(simulate_app, name="simulate", help="Generate test conversations.")
87
+
88
+
89
+ if __name__ == "__main__":
90
+ app()