ostruct-cli 0.7.2__py3-none-any.whl → 0.8.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.
Files changed (46) hide show
  1. ostruct/cli/__init__.py +21 -3
  2. ostruct/cli/base_errors.py +1 -1
  3. ostruct/cli/cli.py +66 -1983
  4. ostruct/cli/click_options.py +460 -28
  5. ostruct/cli/code_interpreter.py +238 -0
  6. ostruct/cli/commands/__init__.py +32 -0
  7. ostruct/cli/commands/list_models.py +128 -0
  8. ostruct/cli/commands/quick_ref.py +50 -0
  9. ostruct/cli/commands/run.py +137 -0
  10. ostruct/cli/commands/update_registry.py +71 -0
  11. ostruct/cli/config.py +277 -0
  12. ostruct/cli/cost_estimation.py +134 -0
  13. ostruct/cli/errors.py +310 -6
  14. ostruct/cli/exit_codes.py +1 -0
  15. ostruct/cli/explicit_file_processor.py +548 -0
  16. ostruct/cli/field_utils.py +69 -0
  17. ostruct/cli/file_info.py +42 -9
  18. ostruct/cli/file_list.py +301 -102
  19. ostruct/cli/file_search.py +455 -0
  20. ostruct/cli/file_utils.py +47 -13
  21. ostruct/cli/mcp_integration.py +541 -0
  22. ostruct/cli/model_creation.py +150 -1
  23. ostruct/cli/model_validation.py +204 -0
  24. ostruct/cli/progress_reporting.py +398 -0
  25. ostruct/cli/registry_updates.py +14 -9
  26. ostruct/cli/runner.py +1418 -0
  27. ostruct/cli/schema_utils.py +113 -0
  28. ostruct/cli/services.py +626 -0
  29. ostruct/cli/template_debug.py +748 -0
  30. ostruct/cli/template_debug_help.py +162 -0
  31. ostruct/cli/template_env.py +15 -6
  32. ostruct/cli/template_filters.py +55 -3
  33. ostruct/cli/template_optimizer.py +474 -0
  34. ostruct/cli/template_processor.py +1080 -0
  35. ostruct/cli/template_rendering.py +69 -34
  36. ostruct/cli/token_validation.py +286 -0
  37. ostruct/cli/types.py +78 -0
  38. ostruct/cli/unattended_operation.py +269 -0
  39. ostruct/cli/validators.py +386 -3
  40. {ostruct_cli-0.7.2.dist-info → ostruct_cli-0.8.0.dist-info}/LICENSE +2 -0
  41. ostruct_cli-0.8.0.dist-info/METADATA +633 -0
  42. ostruct_cli-0.8.0.dist-info/RECORD +69 -0
  43. {ostruct_cli-0.7.2.dist-info → ostruct_cli-0.8.0.dist-info}/WHEEL +1 -1
  44. ostruct_cli-0.7.2.dist-info/METADATA +0 -370
  45. ostruct_cli-0.7.2.dist-info/RECORD +0 -45
  46. {ostruct_cli-0.7.2.dist-info → ostruct_cli-0.8.0.dist-info}/entry_points.txt +0 -0
ostruct/cli/__init__.py CHANGED
@@ -1,21 +1,39 @@
1
1
  """Command-line interface for making structured OpenAI API calls."""
2
2
 
3
+ # Import modules for test mocking support
4
+ from . import (
5
+ config,
6
+ mcp_integration,
7
+ model_validation,
8
+ runner,
9
+ )
3
10
  from .cli import (
4
11
  ExitCode,
12
+ create_cli,
5
13
  main,
6
- validate_schema_file,
7
- validate_task_template,
8
- validate_variable_mapping,
9
14
  )
10
15
  from .path_utils import validate_path_mapping
11
16
  from .registry_updates import get_update_notification
17
+ from .runner import OstructRunner
18
+ from .template_processor import validate_task_template
19
+ from .validators import (
20
+ validate_schema_file,
21
+ validate_variable_mapping,
22
+ )
12
23
 
13
24
  __all__ = [
14
25
  "ExitCode",
15
26
  "main",
27
+ "create_cli",
16
28
  "validate_path_mapping",
17
29
  "validate_schema_file",
18
30
  "validate_task_template",
19
31
  "validate_variable_mapping",
20
32
  "get_update_notification",
33
+ "OstructRunner",
34
+ # Modules for test mocking
35
+ "config",
36
+ "mcp_integration",
37
+ "model_validation",
38
+ "runner",
21
39
  ]
@@ -147,7 +147,7 @@ class CLIError(Exception):
147
147
  if tips := self.context.get("troubleshooting"):
148
148
  lines.extend(["", "Troubleshooting:"])
149
149
  if isinstance(tips, list):
150
- lines.extend(f" {i+1}. {tip}" for i, tip in enumerate(tips))
150
+ lines.extend(f" {i + 1}. {tip}" for i, tip in enumerate(tips))
151
151
  else:
152
152
  lines.append(f" 1. {tips}")
153
153