convergent-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.

Potentially problematic release.


This version of convergent-cli might be problematic. Click here for more details.

Files changed (83) hide show
  1. convergent_cli/__init__.py +1 -0
  2. convergent_cli/auth.py +227 -0
  3. convergent_cli/build_context.py +225 -0
  4. convergent_cli/calibration_finish.py +310 -0
  5. convergent_cli/calibration_frontier.py +499 -0
  6. convergent_cli/calibration_runner.py +1413 -0
  7. convergent_cli/calibration_send.py +44 -0
  8. convergent_cli/codex_app_server.py +127 -0
  9. convergent_cli/command_tree.py +102 -0
  10. convergent_cli/commands/__init__.py +58 -0
  11. convergent_cli/commands/agents.py +729 -0
  12. convergent_cli/commands/auth.py +117 -0
  13. convergent_cli/commands/calibration.py +3857 -0
  14. convergent_cli/commands/calibration_labels_load.py +627 -0
  15. convergent_cli/commands/capabilities.py +85 -0
  16. convergent_cli/commands/dataset_authoring.py +964 -0
  17. convergent_cli/commands/dataset_import.py +763 -0
  18. convergent_cli/commands/datasets.py +678 -0
  19. convergent_cli/commands/docs.py +120 -0
  20. convergent_cli/commands/doctor.py +124 -0
  21. convergent_cli/commands/environments.py +63 -0
  22. convergent_cli/commands/findings.py +206 -0
  23. convergent_cli/commands/graders.py +803 -0
  24. convergent_cli/commands/harness.py +366 -0
  25. convergent_cli/commands/issues.py +388 -0
  26. convergent_cli/commands/production.py +173 -0
  27. convergent_cli/commands/profile.py +86 -0
  28. convergent_cli/commands/rubrics.py +14 -0
  29. convergent_cli/commands/runs.py +1763 -0
  30. convergent_cli/commands/setup.py +968 -0
  31. convergent_cli/commands/task_qc.py +1041 -0
  32. convergent_cli/commands/task_qc_reports.py +393 -0
  33. convergent_cli/commands/verdicts.py +156 -0
  34. convergent_cli/commands/workspaces.py +170 -0
  35. convergent_cli/commands/worlds.py +292 -0
  36. convergent_cli/confirm.py +59 -0
  37. convergent_cli/control_client.py +141 -0
  38. convergent_cli/customer_client.py +1272 -0
  39. convergent_cli/docs_client.py +165 -0
  40. convergent_cli/errors.py +212 -0
  41. convergent_cli/harness_run.py +1169 -0
  42. convergent_cli/harness_tree.py +854 -0
  43. convergent_cli/installed_agent.py +1071 -0
  44. convergent_cli/json_files.py +23 -0
  45. convergent_cli/local_files.py +64 -0
  46. convergent_cli/main.py +106 -0
  47. convergent_cli/oauth.py +431 -0
  48. convergent_cli/output.py +15 -0
  49. convergent_cli/paging.py +62 -0
  50. convergent_cli/run_calibration.py +361 -0
  51. convergent_cli/run_usage.py +99 -0
  52. convergent_cli/sessions.py +275 -0
  53. convergent_cli/setup_agents.py +190 -0
  54. convergent_cli/setup_auth.py +463 -0
  55. convergent_cli/setup_instrument.py +244 -0
  56. convergent_cli/setup_mcp.py +525 -0
  57. convergent_cli/setup_wizard.py +125 -0
  58. convergent_cli/skill_files/convergent/SKILL.md +25 -0
  59. convergent_cli/skill_files/convergent-instrument/SKILL.md +15 -0
  60. convergent_cli/skill_files/convergent-verify/SKILL.md +15 -0
  61. convergent_cli/skills.py +489 -0
  62. convergent_cli/state.py +297 -0
  63. convergent_cli/transport.py +242 -0
  64. convergent_cli/verdict_feedback.py +161 -0
  65. convergent_cli/verifier_bench_preflight.py +32 -0
  66. convergent_cli/world_docker.py +145 -0
  67. convergent_cli/world_files.py +432 -0
  68. convergent_cli/world_live.py +660 -0
  69. convergent_cli/world_mcp.py +109 -0
  70. convergent_cli/world_probe_requirements.txt +29 -0
  71. convergent_cli/world_template/Dockerfile +10 -0
  72. convergent_cli/world_template/README.md +38 -0
  73. convergent_cli/world_template/convergent.toml +11 -0
  74. convergent_cli/world_template/examples/default/environment/catalog.json +3 -0
  75. convergent_cli/world_template/examples/default/instruction.md +1 -0
  76. convergent_cli/world_template/requirements.txt +1 -0
  77. convergent_cli/world_template/schemas/catalog.json +5 -0
  78. convergent_cli/world_template/server.py +25 -0
  79. convergent_cli-0.1.0.dist-info/METADATA +679 -0
  80. convergent_cli-0.1.0.dist-info/RECORD +83 -0
  81. convergent_cli-0.1.0.dist-info/WHEEL +4 -0
  82. convergent_cli-0.1.0.dist-info/entry_points.txt +2 -0
  83. convergent_cli-0.1.0.dist-info/licenses/LICENSE +202 -0
@@ -0,0 +1,117 @@
1
+ """Hosted auth command registration for ``cv``."""
2
+
3
+ from __future__ import annotations
4
+
5
+ import argparse
6
+ from typing import Any
7
+
8
+ from convergent_cli import auth as hosted_auth
9
+ from convergent_cli.command_tree import CommandCatalog, CommandInfo, Effect, Plane
10
+ from convergent_cli.output import emit_json
11
+
12
+
13
+ def register(subparsers: Any, catalog: CommandCatalog) -> None:
14
+ login = subparsers.add_parser(
15
+ "login",
16
+ help="Sign in to Convergent.",
17
+ description="Sign in to Convergent.",
18
+ )
19
+ login.add_argument(
20
+ "--profile",
21
+ default=argparse.SUPPRESS,
22
+ help="Profile to sign in. Defaults to the active profile.",
23
+ )
24
+ login.add_argument(
25
+ "--control-api-url",
26
+ help="Hosted control origin for a new profile or profile update.",
27
+ )
28
+ login.add_argument(
29
+ "--client-id",
30
+ help="Public OAuth client id. Overrides built-in hosted clients.",
31
+ )
32
+ login.add_argument(
33
+ "--headless",
34
+ action="store_true",
35
+ help=(
36
+ "Print the authorization URL and read the pasted redirect instead of opening a browser."
37
+ ),
38
+ )
39
+ catalog.bind(
40
+ parser=login,
41
+ handler=_login,
42
+ info=CommandInfo(
43
+ path=("login",),
44
+ description="Sign in to Convergent.",
45
+ plane=Plane.LOCAL,
46
+ requires_session=False,
47
+ effect=Effect.WRITE,
48
+ ),
49
+ )
50
+
51
+ whoami = subparsers.add_parser("whoami", help="Show the signed-in user and organization.")
52
+ whoami.add_argument(
53
+ "--profile",
54
+ default=argparse.SUPPRESS,
55
+ help="Profile to read. Defaults to the active profile.",
56
+ )
57
+ catalog.bind(
58
+ parser=whoami,
59
+ handler=_whoami,
60
+ info=CommandInfo(
61
+ path=("whoami",),
62
+ description="Show the signed-in user and organization.",
63
+ plane=Plane.CONTROL,
64
+ requires_session=True,
65
+ effect=Effect.READ,
66
+ ),
67
+ )
68
+
69
+ logout = subparsers.add_parser("logout", help="Remove the local session for a profile.")
70
+ logout.add_argument(
71
+ "--profile",
72
+ default=argparse.SUPPRESS,
73
+ help="Profile to sign out. Defaults to the active profile.",
74
+ )
75
+ catalog.bind(
76
+ parser=logout,
77
+ handler=_logout,
78
+ info=CommandInfo(
79
+ path=("logout",),
80
+ description="Remove the local session for a profile.",
81
+ plane=Plane.LOCAL,
82
+ requires_session=False,
83
+ effect=Effect.WRITE,
84
+ ),
85
+ )
86
+
87
+
88
+ def _login(args: argparse.Namespace) -> int:
89
+ result = hosted_auth.login(
90
+ profile_name=args.profile,
91
+ control_api_url=args.control_api_url,
92
+ client_id=args.client_id,
93
+ headless=args.headless,
94
+ )
95
+ print(
96
+ f"Signed in as {result.identity['email']} ({result.identity['organization_id']}) "
97
+ f"at {result.origin}; stored the session for profile {result.profile_name!r} "
98
+ f"at {result.session_file}."
99
+ )
100
+ return 0
101
+
102
+
103
+ def _logout(args: argparse.Namespace) -> int:
104
+ name, removed = hosted_auth.logout(profile_name=args.profile)
105
+ if removed:
106
+ print(f"Removed the local session for profile {name!r}.")
107
+ else:
108
+ print(f"No local session for profile {name!r}; already logged out.")
109
+ return 0
110
+
111
+
112
+ def _whoami(args: argparse.Namespace) -> int:
113
+ emit_json(hosted_auth.whoami(profile_name=args.profile))
114
+ return 0
115
+
116
+
117
+ __all__ = ["register"]