swytchcode-runtime 1.1.3__tar.gz → 1.1.4__tar.gz
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.
- {swytchcode_runtime-1.1.3/swytchcode_runtime.egg-info → swytchcode_runtime-1.1.4}/PKG-INFO +1 -1
- {swytchcode_runtime-1.1.3 → swytchcode_runtime-1.1.4}/pyproject.toml +1 -1
- {swytchcode_runtime-1.1.3 → swytchcode_runtime-1.1.4}/swytchcode_runtime/exec.py +10 -0
- {swytchcode_runtime-1.1.3 → swytchcode_runtime-1.1.4}/swytchcode_runtime/schema.py +3 -1
- {swytchcode_runtime-1.1.3 → swytchcode_runtime-1.1.4/swytchcode_runtime.egg-info}/PKG-INFO +1 -1
- {swytchcode_runtime-1.1.3 → swytchcode_runtime-1.1.4}/LICENSE.md +0 -0
- {swytchcode_runtime-1.1.3 → swytchcode_runtime-1.1.4}/README.md +0 -0
- {swytchcode_runtime-1.1.3 → swytchcode_runtime-1.1.4}/setup.cfg +0 -0
- {swytchcode_runtime-1.1.3 → swytchcode_runtime-1.1.4}/swytchcode_runtime/__init__.py +0 -0
- {swytchcode_runtime-1.1.3 → swytchcode_runtime-1.1.4}/swytchcode_runtime/cli.py +0 -0
- {swytchcode_runtime-1.1.3 → swytchcode_runtime-1.1.4}/swytchcode_runtime/client.py +0 -0
- {swytchcode_runtime-1.1.3 → swytchcode_runtime-1.1.4}/swytchcode_runtime/discover.py +0 -0
- {swytchcode_runtime-1.1.3 → swytchcode_runtime-1.1.4}/swytchcode_runtime/errors.py +0 -0
- {swytchcode_runtime-1.1.3 → swytchcode_runtime-1.1.4}/swytchcode_runtime/manage.py +0 -0
- {swytchcode_runtime-1.1.3 → swytchcode_runtime-1.1.4}/swytchcode_runtime/prompts.py +0 -0
- {swytchcode_runtime-1.1.3 → swytchcode_runtime-1.1.4}/swytchcode_runtime/providers/__init__.py +0 -0
- {swytchcode_runtime-1.1.3 → swytchcode_runtime-1.1.4}/swytchcode_runtime/providers/anthropic.py +0 -0
- {swytchcode_runtime-1.1.3 → swytchcode_runtime-1.1.4}/swytchcode_runtime/providers/base.py +0 -0
- {swytchcode_runtime-1.1.3 → swytchcode_runtime-1.1.4}/swytchcode_runtime/providers/crewai.py +0 -0
- {swytchcode_runtime-1.1.3 → swytchcode_runtime-1.1.4}/swytchcode_runtime/providers/langgraph.py +0 -0
- {swytchcode_runtime-1.1.3 → swytchcode_runtime-1.1.4}/swytchcode_runtime/providers/openai_agents.py +0 -0
- {swytchcode_runtime-1.1.3 → swytchcode_runtime-1.1.4}/swytchcode_runtime/providers/vercel.py +0 -0
- {swytchcode_runtime-1.1.3 → swytchcode_runtime-1.1.4}/swytchcode_runtime.egg-info/SOURCES.txt +0 -0
- {swytchcode_runtime-1.1.3 → swytchcode_runtime-1.1.4}/swytchcode_runtime.egg-info/dependency_links.txt +0 -0
- {swytchcode_runtime-1.1.3 → swytchcode_runtime-1.1.4}/swytchcode_runtime.egg-info/top_level.txt +0 -0
- {swytchcode_runtime-1.1.3 → swytchcode_runtime-1.1.4}/tests/test_alias.py +0 -0
- {swytchcode_runtime-1.1.3 → swytchcode_runtime-1.1.4}/tests/test_exec_errors.py +0 -0
- {swytchcode_runtime-1.1.3 → swytchcode_runtime-1.1.4}/tests/test_nested_body.py +0 -0
- {swytchcode_runtime-1.1.3 → swytchcode_runtime-1.1.4}/tests/test_prompts.py +0 -0
- {swytchcode_runtime-1.1.3 → swytchcode_runtime-1.1.4}/tests/test_schema_routing.py +0 -0
|
@@ -155,6 +155,16 @@ def exec_(
|
|
|
155
155
|
stderr = result.stderr.decode("utf-8", errors="replace").strip()
|
|
156
156
|
stdout = result.stdout.decode("utf-8", errors="replace")
|
|
157
157
|
|
|
158
|
+
if "demo_mode" in stderr or "data is simulated" in stderr:
|
|
159
|
+
demo_allowed = (env and env.get("SWYTCHCODE_DEMO") == "1") or os.environ.get(
|
|
160
|
+
"SWYTCHCODE_DEMO"
|
|
161
|
+
) == "1"
|
|
162
|
+
if not demo_allowed:
|
|
163
|
+
raise SwytchcodeError(
|
|
164
|
+
f"Swytchcode CLI executed in simulated demo mode: {stderr}. "
|
|
165
|
+
"Initialize a project with `swytchcode init` or pass --demo explicitly."
|
|
166
|
+
)
|
|
167
|
+
|
|
158
168
|
if result.returncode != 0:
|
|
159
169
|
classified = _parse_classified_error(stderr)
|
|
160
170
|
if classified:
|
|
@@ -102,6 +102,8 @@ def _expand(spec: Any) -> dict:
|
|
|
102
102
|
items = spec["schema"].get("items")
|
|
103
103
|
if isinstance(items, dict):
|
|
104
104
|
out["items"] = _expand(items)
|
|
105
|
+
else:
|
|
106
|
+
out["items"] = {"type": "string"}
|
|
105
107
|
|
|
106
108
|
return out
|
|
107
109
|
|
|
@@ -191,7 +193,7 @@ def to_pydantic_model(schema: dict, name: str = "ArgsSchema") -> Any:
|
|
|
191
193
|
elif t == "boolean":
|
|
192
194
|
field_type = bool
|
|
193
195
|
elif t == "array":
|
|
194
|
-
field_type = list
|
|
196
|
+
field_type = list[str]
|
|
195
197
|
elif t == "object":
|
|
196
198
|
# Only build a nested model when the object's fields are known.
|
|
197
199
|
# A property-less object (freeform body) becomes a plain dict: an
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{swytchcode_runtime-1.1.3 → swytchcode_runtime-1.1.4}/swytchcode_runtime/providers/__init__.py
RENAMED
|
File without changes
|
{swytchcode_runtime-1.1.3 → swytchcode_runtime-1.1.4}/swytchcode_runtime/providers/anthropic.py
RENAMED
|
File without changes
|
|
File without changes
|
{swytchcode_runtime-1.1.3 → swytchcode_runtime-1.1.4}/swytchcode_runtime/providers/crewai.py
RENAMED
|
File without changes
|
{swytchcode_runtime-1.1.3 → swytchcode_runtime-1.1.4}/swytchcode_runtime/providers/langgraph.py
RENAMED
|
File without changes
|
{swytchcode_runtime-1.1.3 → swytchcode_runtime-1.1.4}/swytchcode_runtime/providers/openai_agents.py
RENAMED
|
File without changes
|
{swytchcode_runtime-1.1.3 → swytchcode_runtime-1.1.4}/swytchcode_runtime/providers/vercel.py
RENAMED
|
File without changes
|
{swytchcode_runtime-1.1.3 → swytchcode_runtime-1.1.4}/swytchcode_runtime.egg-info/SOURCES.txt
RENAMED
|
File without changes
|
|
File without changes
|
{swytchcode_runtime-1.1.3 → swytchcode_runtime-1.1.4}/swytchcode_runtime.egg-info/top_level.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|