ostruct-cli 0.7.2__py3-none-any.whl → 0.8.1__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.
- ostruct/cli/__init__.py +21 -3
- ostruct/cli/base_errors.py +1 -1
- ostruct/cli/cli.py +66 -1983
- ostruct/cli/click_options.py +460 -28
- ostruct/cli/code_interpreter.py +238 -0
- ostruct/cli/commands/__init__.py +32 -0
- ostruct/cli/commands/list_models.py +128 -0
- ostruct/cli/commands/quick_ref.py +54 -0
- ostruct/cli/commands/run.py +137 -0
- ostruct/cli/commands/update_registry.py +71 -0
- ostruct/cli/config.py +277 -0
- ostruct/cli/cost_estimation.py +134 -0
- ostruct/cli/errors.py +310 -6
- ostruct/cli/exit_codes.py +1 -0
- ostruct/cli/explicit_file_processor.py +548 -0
- ostruct/cli/field_utils.py +69 -0
- ostruct/cli/file_info.py +42 -9
- ostruct/cli/file_list.py +301 -102
- ostruct/cli/file_search.py +455 -0
- ostruct/cli/file_utils.py +47 -13
- ostruct/cli/mcp_integration.py +541 -0
- ostruct/cli/model_creation.py +150 -1
- ostruct/cli/model_validation.py +204 -0
- ostruct/cli/progress_reporting.py +398 -0
- ostruct/cli/registry_updates.py +14 -9
- ostruct/cli/runner.py +1418 -0
- ostruct/cli/schema_utils.py +113 -0
- ostruct/cli/services.py +626 -0
- ostruct/cli/template_debug.py +748 -0
- ostruct/cli/template_debug_help.py +162 -0
- ostruct/cli/template_env.py +15 -6
- ostruct/cli/template_filters.py +55 -3
- ostruct/cli/template_optimizer.py +474 -0
- ostruct/cli/template_processor.py +1080 -0
- ostruct/cli/template_rendering.py +69 -34
- ostruct/cli/token_validation.py +286 -0
- ostruct/cli/types.py +78 -0
- ostruct/cli/unattended_operation.py +269 -0
- ostruct/cli/validators.py +386 -3
- {ostruct_cli-0.7.2.dist-info → ostruct_cli-0.8.1.dist-info}/LICENSE +2 -0
- ostruct_cli-0.8.1.dist-info/METADATA +638 -0
- ostruct_cli-0.8.1.dist-info/RECORD +69 -0
- {ostruct_cli-0.7.2.dist-info → ostruct_cli-0.8.1.dist-info}/WHEEL +1 -1
- ostruct_cli-0.7.2.dist-info/METADATA +0 -370
- ostruct_cli-0.7.2.dist-info/RECORD +0 -45
- {ostruct_cli-0.7.2.dist-info → ostruct_cli-0.8.1.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
|
]
|
ostruct/cli/base_errors.py
CHANGED
@@ -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
|
|