jvcli 2.0.22__tar.gz → 2.0.24__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.
- {jvcli-2.0.22/jvcli.egg-info → jvcli-2.0.24}/PKG-INFO +1 -1
- {jvcli-2.0.22 → jvcli-2.0.24}/jvcli/__init__.py +1 -1
- {jvcli-2.0.22 → jvcli-2.0.24}/jvcli/client/lib/widgets.py +95 -58
- {jvcli-2.0.22 → jvcli-2.0.24}/jvcli/client/pages/analytics_page.py +1 -0
- {jvcli-2.0.22 → jvcli-2.0.24}/jvcli/commands/publish.py +1 -1
- {jvcli-2.0.22 → jvcli-2.0.24}/jvcli/utils.py +6 -2
- {jvcli-2.0.22 → jvcli-2.0.24/jvcli.egg-info}/PKG-INFO +1 -1
- {jvcli-2.0.22 → jvcli-2.0.24}/LICENSE +0 -0
- {jvcli-2.0.22 → jvcli-2.0.24}/MANIFEST.in +0 -0
- {jvcli-2.0.22 → jvcli-2.0.24}/README.md +0 -0
- {jvcli-2.0.22 → jvcli-2.0.24}/jvcli/api.py +0 -0
- {jvcli-2.0.22 → jvcli-2.0.24}/jvcli/auth.py +0 -0
- {jvcli-2.0.22 → jvcli-2.0.24}/jvcli/cli.py +0 -0
- {jvcli-2.0.22 → jvcli-2.0.24}/jvcli/client/__init__.py +0 -0
- {jvcli-2.0.22 → jvcli-2.0.24}/jvcli/client/app.py +0 -0
- {jvcli-2.0.22 → jvcli-2.0.24}/jvcli/client/lib/__init__.py +0 -0
- {jvcli-2.0.22 → jvcli-2.0.24}/jvcli/client/lib/page.py +0 -0
- {jvcli-2.0.22 → jvcli-2.0.24}/jvcli/client/lib/utils.py +0 -0
- {jvcli-2.0.22 → jvcli-2.0.24}/jvcli/client/pages/__init__.py +0 -0
- {jvcli-2.0.22 → jvcli-2.0.24}/jvcli/client/pages/action_dashboard_page.py +0 -0
- {jvcli-2.0.22 → jvcli-2.0.24}/jvcli/client/pages/chat_page.py +0 -0
- {jvcli-2.0.22 → jvcli-2.0.24}/jvcli/client/pages/graph_page.py +0 -0
- {jvcli-2.0.22 → jvcli-2.0.24}/jvcli/commands/__init__.py +0 -0
- {jvcli-2.0.22 → jvcli-2.0.24}/jvcli/commands/auth.py +0 -0
- {jvcli-2.0.22 → jvcli-2.0.24}/jvcli/commands/clean.py +0 -0
- {jvcli-2.0.22 → jvcli-2.0.24}/jvcli/commands/client.py +0 -0
- {jvcli-2.0.22 → jvcli-2.0.24}/jvcli/commands/create.py +0 -0
- {jvcli-2.0.22 → jvcli-2.0.24}/jvcli/commands/download.py +0 -0
- {jvcli-2.0.22 → jvcli-2.0.24}/jvcli/commands/info.py +0 -0
- {jvcli-2.0.22 → jvcli-2.0.24}/jvcli/commands/server.py +0 -0
- {jvcli-2.0.22 → jvcli-2.0.24}/jvcli/commands/startproject.py +0 -0
- {jvcli-2.0.22 → jvcli-2.0.24}/jvcli/commands/studio.py +0 -0
- {jvcli-2.0.22 → jvcli-2.0.24}/jvcli/commands/update.py +0 -0
- {jvcli-2.0.22 → jvcli-2.0.24}/jvcli/studio/assets/index-DDV79SDu.js +0 -0
- {jvcli-2.0.22 → jvcli-2.0.24}/jvcli/studio/assets/index-DdMMONxd.css +0 -0
- {jvcli-2.0.22 → jvcli-2.0.24}/jvcli/studio/index.html +0 -0
- {jvcli-2.0.22 → jvcli-2.0.24}/jvcli/studio/jac_logo.png +0 -0
- {jvcli-2.0.22 → jvcli-2.0.24}/jvcli/studio/tauri.svg +0 -0
- {jvcli-2.0.22 → jvcli-2.0.24}/jvcli/studio/vite.svg +0 -0
- {jvcli-2.0.22 → jvcli-2.0.24}/jvcli/studio-auth/assets/index-Bh6lyeXA.js +0 -0
- {jvcli-2.0.22 → jvcli-2.0.24}/jvcli/studio-auth/assets/index-DdMMONxd.css +0 -0
- {jvcli-2.0.22 → jvcli-2.0.24}/jvcli/studio-auth/index.html +0 -0
- {jvcli-2.0.22 → jvcli-2.0.24}/jvcli/studio-auth/jac_logo.png +0 -0
- {jvcli-2.0.22 → jvcli-2.0.24}/jvcli/studio-auth/tauri.svg +0 -0
- {jvcli-2.0.22 → jvcli-2.0.24}/jvcli/studio-auth/vite.svg +0 -0
- {jvcli-2.0.22 → jvcli-2.0.24}/jvcli/templates/2.0.0/action_info.yaml +0 -0
- {jvcli-2.0.22 → jvcli-2.0.24}/jvcli/templates/2.0.0/agent_descriptor.yaml +0 -0
- {jvcli-2.0.22 → jvcli-2.0.24}/jvcli/templates/2.0.0/agent_info.yaml +0 -0
- {jvcli-2.0.22 → jvcli-2.0.24}/jvcli/templates/2.0.0/agent_knowledge.yaml +0 -0
- {jvcli-2.0.22 → jvcli-2.0.24}/jvcli/templates/2.0.0/agent_memory.yaml +0 -0
- {jvcli-2.0.22 → jvcli-2.0.24}/jvcli/templates/2.0.0/project/README.md +0 -0
- {jvcli-2.0.22 → jvcli-2.0.24}/jvcli/templates/2.0.0/project/actions/README.md +0 -0
- {jvcli-2.0.22 → jvcli-2.0.24}/jvcli/templates/2.0.0/project/daf/README.md +0 -0
- {jvcli-2.0.22 → jvcli-2.0.24}/jvcli/templates/2.0.0/project/env.example +0 -0
- {jvcli-2.0.22 → jvcli-2.0.24}/jvcli/templates/2.0.0/project/gitignore.example +0 -0
- {jvcli-2.0.22 → jvcli-2.0.24}/jvcli/templates/2.0.0/project/globals.jac +0 -0
- {jvcli-2.0.22 → jvcli-2.0.24}/jvcli/templates/2.0.0/project/main.jac +0 -0
- {jvcli-2.0.22 → jvcli-2.0.24}/jvcli/templates/2.0.0/project/tests/README.md +0 -0
- {jvcli-2.0.22 → jvcli-2.0.24}/jvcli/templates/CHANGELOG.md +0 -0
- {jvcli-2.0.22 → jvcli-2.0.24}/jvcli/templates/README.md +0 -0
- {jvcli-2.0.22 → jvcli-2.0.24}/jvcli.egg-info/SOURCES.txt +0 -0
- {jvcli-2.0.22 → jvcli-2.0.24}/jvcli.egg-info/dependency_links.txt +0 -0
- {jvcli-2.0.22 → jvcli-2.0.24}/jvcli.egg-info/entry_points.txt +0 -0
- {jvcli-2.0.22 → jvcli-2.0.24}/jvcli.egg-info/requires.txt +0 -0
- {jvcli-2.0.22 → jvcli-2.0.24}/jvcli.egg-info/top_level.txt +0 -0
- {jvcli-2.0.22 → jvcli-2.0.24}/setup.cfg +0 -0
- {jvcli-2.0.22 → jvcli-2.0.24}/setup.py +0 -0
- {jvcli-2.0.22 → jvcli-2.0.24}/tests/test_api.py +0 -0
- {jvcli-2.0.22 → jvcli-2.0.24}/tests/test_auth.py +0 -0
- {jvcli-2.0.22 → jvcli-2.0.24}/tests/test_clean.py +0 -0
- {jvcli-2.0.22 → jvcli-2.0.24}/tests/test_cli.py +0 -0
- {jvcli-2.0.22 → jvcli-2.0.24}/tests/test_create.py +0 -0
- {jvcli-2.0.22 → jvcli-2.0.24}/tests/test_download.py +0 -0
- {jvcli-2.0.22 → jvcli-2.0.24}/tests/test_info.py +0 -0
- {jvcli-2.0.22 → jvcli-2.0.24}/tests/test_publish.py +0 -0
- {jvcli-2.0.22 → jvcli-2.0.24}/tests/test_render_basic.py +0 -0
- {jvcli-2.0.22 → jvcli-2.0.24}/tests/test_server.py +0 -0
- {jvcli-2.0.22 → jvcli-2.0.24}/tests/test_startproject.py +0 -0
- {jvcli-2.0.22 → jvcli-2.0.24}/tests/test_studio.py +0 -0
- {jvcli-2.0.22 → jvcli-2.0.24}/tests/test_update.py +0 -0
- {jvcli-2.0.22 → jvcli-2.0.24}/tests/test_utils.py +0 -0
@@ -35,11 +35,26 @@ def app_header(agent_id: str, action_id: str, info: dict) -> tuple:
|
|
35
35
|
if description := st.session_state[model_key].get("description", False):
|
36
36
|
st.text(description)
|
37
37
|
|
38
|
-
|
39
|
-
|
40
|
-
|
38
|
+
def update_action() -> None:
|
39
|
+
st.session_state[model_key]
|
40
|
+
call_update_action(
|
41
|
+
agent_id=agent_id,
|
42
|
+
action_id=action_id,
|
43
|
+
action_data=st.session_state[model_key],
|
44
|
+
)
|
45
|
+
|
46
|
+
current_state = st.session_state[model_key]["enabled"]
|
47
|
+
new_state = st.checkbox(
|
48
|
+
"Enabled",
|
49
|
+
key="enabled",
|
50
|
+
value=current_state,
|
41
51
|
)
|
42
52
|
|
53
|
+
if new_state != current_state:
|
54
|
+
st.session_state[model_key]["enabled"] = new_state
|
55
|
+
update_action()
|
56
|
+
st.rerun()
|
57
|
+
|
43
58
|
return model_key, module_root
|
44
59
|
|
45
60
|
|
@@ -48,77 +63,99 @@ def snake_to_title(snake_str: str) -> str:
|
|
48
63
|
return snake_str.replace("_", " ").title()
|
49
64
|
|
50
65
|
|
51
|
-
def app_controls(
|
66
|
+
def app_controls(
|
67
|
+
agent_id: str,
|
68
|
+
action_id: str,
|
69
|
+
hidden: Optional[list] = None,
|
70
|
+
masked: Optional[list] = None,
|
71
|
+
) -> None:
|
52
72
|
"""Render the app controls for a given agent and action."""
|
73
|
+
if hidden is None:
|
74
|
+
hidden = []
|
75
|
+
if masked is None:
|
76
|
+
masked = []
|
77
|
+
|
53
78
|
# Generate a dynamic key for the session state using the action_id
|
54
79
|
model_key = f"model_{agent_id}_{action_id}"
|
55
80
|
|
81
|
+
# Combine default masked keys with additional keys specified in 'masked'
|
82
|
+
default_masked_keys = [
|
83
|
+
"password",
|
84
|
+
"token",
|
85
|
+
"api_key",
|
86
|
+
"key",
|
87
|
+
"secret",
|
88
|
+
"secret_key",
|
89
|
+
]
|
90
|
+
all_masked_keys = set(default_masked_keys + masked)
|
91
|
+
|
56
92
|
# Recursive function to handle nested dictionaries
|
57
93
|
def render_fields(item_key: str, value: Any, parent_key: str = "") -> None:
|
58
94
|
"""Render fields based on their type."""
|
59
95
|
|
96
|
+
# Skip rendering if the field is in the hidden list
|
97
|
+
if item_key in hidden:
|
98
|
+
return
|
99
|
+
|
60
100
|
field_type = type(value)
|
61
101
|
label = snake_to_title(item_key) # Convert item_key to Title Case
|
62
102
|
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
103
|
+
# Special case for masked fields to render as a password field
|
104
|
+
if item_key.lower() in all_masked_keys:
|
105
|
+
st.session_state[model_key][item_key] = st.text_input(
|
106
|
+
label, value=value, type="password", key=item_key
|
107
|
+
)
|
108
|
+
|
109
|
+
elif field_type == int:
|
110
|
+
st.session_state[model_key][item_key] = st.number_input(
|
111
|
+
label, value=value, step=1, key=item_key
|
112
|
+
)
|
113
|
+
|
114
|
+
elif field_type == float:
|
115
|
+
st.session_state[model_key][item_key] = st.number_input(
|
116
|
+
label, value=value, step=0.01, key=item_key
|
117
|
+
)
|
118
|
+
|
119
|
+
elif field_type == bool:
|
120
|
+
st.session_state[model_key][item_key] = st.checkbox(
|
121
|
+
label, value=value, key=item_key
|
122
|
+
)
|
123
|
+
|
124
|
+
elif field_type == list:
|
125
|
+
yaml_str = st.text_area(
|
126
|
+
label + " (YAML format)", value=yaml.dump(value), key=item_key
|
127
|
+
)
|
128
|
+
try:
|
129
|
+
# Update the list with the user-defined YAML
|
130
|
+
loaded_value = yaml.safe_load(yaml_str)
|
131
|
+
if not isinstance(loaded_value, list):
|
132
|
+
raise ValueError("The provided YAML does not produce a list.")
|
133
|
+
st.session_state[model_key][item_key] = loaded_value
|
134
|
+
except (yaml.YAMLError, ValueError) as e:
|
135
|
+
st.error(f"Error parsing YAML for {item_key}: {e}")
|
136
|
+
|
137
|
+
elif field_type == str:
|
138
|
+
if len(value) > 100:
|
139
|
+
st.session_state[model_key][item_key] = st.text_area(
|
140
|
+
label, value=value, key=item_key
|
78
141
|
)
|
79
|
-
|
80
|
-
|
81
|
-
st.session_state[model_key][item_key] = st.checkbox(
|
142
|
+
else:
|
143
|
+
st.session_state[model_key][item_key] = st.text_input(
|
82
144
|
label, value=value, key=item_key
|
83
145
|
)
|
84
146
|
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
st.session_state[model_key][item_key] = loaded_value
|
95
|
-
except (yaml.YAMLError, ValueError) as e:
|
96
|
-
st.error(f"Error parsing YAML for {item_key}: {e}")
|
97
|
-
|
98
|
-
elif field_type == str:
|
99
|
-
if len(value) > 100:
|
100
|
-
st.session_state[model_key][item_key] = st.text_area(
|
101
|
-
label, value=value, key=item_key
|
102
|
-
)
|
103
|
-
else:
|
104
|
-
st.session_state[model_key][item_key] = st.text_input(
|
105
|
-
label, value=value, key=item_key
|
106
|
-
)
|
107
|
-
|
108
|
-
elif field_type == dict:
|
109
|
-
yaml_str = st.text_area(
|
110
|
-
label + " (YAML format)", value=yaml.dump(value), key=item_key
|
111
|
-
)
|
112
|
-
try:
|
113
|
-
# Update the dictionary with the user-defined YAML
|
114
|
-
st.session_state[model_key][item_key] = (
|
115
|
-
yaml.safe_load(yaml_str) or {}
|
116
|
-
)
|
117
|
-
except yaml.YAMLError as e:
|
118
|
-
st.error(f"Error parsing YAML for {item_key}: {e}")
|
147
|
+
elif field_type == dict:
|
148
|
+
yaml_str = st.text_area(
|
149
|
+
label + " (YAML format)", value=yaml.dump(value), key=item_key
|
150
|
+
)
|
151
|
+
try:
|
152
|
+
# Update the dictionary with the user-defined YAML
|
153
|
+
st.session_state[model_key][item_key] = yaml.safe_load(yaml_str) or {}
|
154
|
+
except yaml.YAMLError as e:
|
155
|
+
st.error(f"Error parsing YAML for {item_key}: {e}")
|
119
156
|
|
120
|
-
|
121
|
-
|
157
|
+
else:
|
158
|
+
st.write(f"Unsupported type for {item_key}: {field_type}")
|
122
159
|
|
123
160
|
# Iterate over keys of context except specific keys
|
124
161
|
keys_to_iterate = [
|
@@ -79,6 +79,7 @@ def render(router: StreamlitRouter) -> None:
|
|
79
79
|
st.text(f"- {warning}")
|
80
80
|
if st.button("Recheck Health", key="recheck_inside_expander"):
|
81
81
|
st.session_state["recheck_health_clicked"] = True
|
82
|
+
st.rerun()
|
82
83
|
|
83
84
|
else:
|
84
85
|
st.error("Failed to fetch healthcheck data.")
|
@@ -157,7 +157,7 @@ def _publish_common(
|
|
157
157
|
return
|
158
158
|
|
159
159
|
try:
|
160
|
-
validate_dependencies(info_data["package"].get("dependencies", {}))
|
160
|
+
validate_dependencies(info_data["package"].get("dependencies", {}), token)
|
161
161
|
click.secho("Dependencies validated successfully.", fg="yellow")
|
162
162
|
except ValueError as e:
|
163
163
|
click.secho(f"Error validating dependencies: {e}", fg="red")
|
@@ -3,6 +3,7 @@
|
|
3
3
|
import os
|
4
4
|
import re
|
5
5
|
import tarfile
|
6
|
+
from typing import Optional
|
6
7
|
|
7
8
|
import click
|
8
9
|
import nodesemver
|
@@ -124,9 +125,11 @@ def is_version_compatible(
|
|
124
125
|
return False
|
125
126
|
|
126
127
|
|
127
|
-
def validate_dependencies(dependencies: dict) -> None:
|
128
|
+
def validate_dependencies(dependencies: dict, token: Optional[str] = None) -> None:
|
128
129
|
"""Ensure all dependencies exist in the registry."""
|
130
|
+
|
129
131
|
missing_dependencies = []
|
132
|
+
|
130
133
|
for dep, specifier in dependencies.items():
|
131
134
|
if dep == "jivas":
|
132
135
|
# Check if the version is in list of supported versions
|
@@ -141,8 +144,9 @@ def validate_dependencies(dependencies: dict) -> None:
|
|
141
144
|
elif dep == "actions":
|
142
145
|
# Check if action exists in the registry
|
143
146
|
for name, spec in specifier.items():
|
147
|
+
|
144
148
|
package = RegistryAPI.download_package(
|
145
|
-
name=name, version=spec, suppress_error=True
|
149
|
+
name=name, version=spec, token=token, suppress_error=True
|
146
150
|
)
|
147
151
|
|
148
152
|
if not package:
|
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
|
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
|
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
|
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
|
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
|
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
|
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
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|