jvcli 2.0.27__tar.gz → 2.0.30__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.
Files changed (81) hide show
  1. {jvcli-2.0.27/jvcli.egg-info → jvcli-2.0.30}/PKG-INFO +1 -1
  2. {jvcli-2.0.27 → jvcli-2.0.30}/jvcli/__init__.py +1 -1
  3. {jvcli-2.0.27 → jvcli-2.0.30}/jvcli/client/lib/utils.py +2 -0
  4. {jvcli-2.0.27 → jvcli-2.0.30}/jvcli/client/pages/chat_page.py +25 -18
  5. {jvcli-2.0.27 → jvcli-2.0.30}/jvcli/commands/create.py +8 -22
  6. {jvcli-2.0.27 → jvcli-2.0.30/jvcli.egg-info}/PKG-INFO +1 -1
  7. {jvcli-2.0.27 → jvcli-2.0.30}/tests/test_cli.py +0 -1
  8. {jvcli-2.0.27 → jvcli-2.0.30}/LICENSE +0 -0
  9. {jvcli-2.0.27 → jvcli-2.0.30}/MANIFEST.in +0 -0
  10. {jvcli-2.0.27 → jvcli-2.0.30}/README.md +0 -0
  11. {jvcli-2.0.27 → jvcli-2.0.30}/jvcli/api.py +0 -0
  12. {jvcli-2.0.27 → jvcli-2.0.30}/jvcli/auth.py +0 -0
  13. {jvcli-2.0.27 → jvcli-2.0.30}/jvcli/cli.py +0 -0
  14. {jvcli-2.0.27 → jvcli-2.0.30}/jvcli/client/__init__.py +0 -0
  15. {jvcli-2.0.27 → jvcli-2.0.30}/jvcli/client/app.py +0 -0
  16. {jvcli-2.0.27 → jvcli-2.0.30}/jvcli/client/lib/__init__.py +0 -0
  17. {jvcli-2.0.27 → jvcli-2.0.30}/jvcli/client/lib/page.py +0 -0
  18. {jvcli-2.0.27 → jvcli-2.0.30}/jvcli/client/lib/widgets.py +0 -0
  19. {jvcli-2.0.27 → jvcli-2.0.30}/jvcli/client/pages/__init__.py +0 -0
  20. {jvcli-2.0.27 → jvcli-2.0.30}/jvcli/client/pages/action_dashboard_page.py +0 -0
  21. {jvcli-2.0.27 → jvcli-2.0.30}/jvcli/client/pages/analytics_page.py +0 -0
  22. {jvcli-2.0.27 → jvcli-2.0.30}/jvcli/client/pages/graph_page.py +0 -0
  23. {jvcli-2.0.27 → jvcli-2.0.30}/jvcli/commands/__init__.py +0 -0
  24. {jvcli-2.0.27 → jvcli-2.0.30}/jvcli/commands/auth.py +0 -0
  25. {jvcli-2.0.27 → jvcli-2.0.30}/jvcli/commands/clean.py +0 -0
  26. {jvcli-2.0.27 → jvcli-2.0.30}/jvcli/commands/client.py +0 -0
  27. {jvcli-2.0.27 → jvcli-2.0.30}/jvcli/commands/download.py +0 -0
  28. {jvcli-2.0.27 → jvcli-2.0.30}/jvcli/commands/info.py +0 -0
  29. {jvcli-2.0.27 → jvcli-2.0.30}/jvcli/commands/publish.py +0 -0
  30. {jvcli-2.0.27 → jvcli-2.0.30}/jvcli/commands/server.py +0 -0
  31. {jvcli-2.0.27 → jvcli-2.0.30}/jvcli/commands/startproject.py +0 -0
  32. {jvcli-2.0.27 → jvcli-2.0.30}/jvcli/commands/studio.py +0 -0
  33. {jvcli-2.0.27 → jvcli-2.0.30}/jvcli/commands/update.py +0 -0
  34. {jvcli-2.0.27 → jvcli-2.0.30}/jvcli/studio/assets/index-DDV79SDu.js +0 -0
  35. {jvcli-2.0.27 → jvcli-2.0.30}/jvcli/studio/assets/index-DdMMONxd.css +0 -0
  36. {jvcli-2.0.27 → jvcli-2.0.30}/jvcli/studio/index.html +0 -0
  37. {jvcli-2.0.27 → jvcli-2.0.30}/jvcli/studio/jac_logo.png +0 -0
  38. {jvcli-2.0.27 → jvcli-2.0.30}/jvcli/studio/tauri.svg +0 -0
  39. {jvcli-2.0.27 → jvcli-2.0.30}/jvcli/studio/vite.svg +0 -0
  40. {jvcli-2.0.27 → jvcli-2.0.30}/jvcli/studio-auth/assets/index-Bh6lyeXA.js +0 -0
  41. {jvcli-2.0.27 → jvcli-2.0.30}/jvcli/studio-auth/assets/index-DdMMONxd.css +0 -0
  42. {jvcli-2.0.27 → jvcli-2.0.30}/jvcli/studio-auth/index.html +0 -0
  43. {jvcli-2.0.27 → jvcli-2.0.30}/jvcli/studio-auth/jac_logo.png +0 -0
  44. {jvcli-2.0.27 → jvcli-2.0.30}/jvcli/studio-auth/tauri.svg +0 -0
  45. {jvcli-2.0.27 → jvcli-2.0.30}/jvcli/studio-auth/vite.svg +0 -0
  46. {jvcli-2.0.27 → jvcli-2.0.30}/jvcli/templates/2.0.0/action_info.yaml +0 -0
  47. {jvcli-2.0.27 → jvcli-2.0.30}/jvcli/templates/2.0.0/agent_descriptor.yaml +0 -0
  48. {jvcli-2.0.27 → jvcli-2.0.30}/jvcli/templates/2.0.0/agent_info.yaml +0 -0
  49. {jvcli-2.0.27 → jvcli-2.0.30}/jvcli/templates/2.0.0/agent_knowledge.yaml +0 -0
  50. {jvcli-2.0.27 → jvcli-2.0.30}/jvcli/templates/2.0.0/agent_memory.yaml +0 -0
  51. {jvcli-2.0.27 → jvcli-2.0.30}/jvcli/templates/2.0.0/project/README.md +0 -0
  52. {jvcli-2.0.27 → jvcli-2.0.30}/jvcli/templates/2.0.0/project/actions/README.md +0 -0
  53. {jvcli-2.0.27 → jvcli-2.0.30}/jvcli/templates/2.0.0/project/daf/README.md +0 -0
  54. {jvcli-2.0.27 → jvcli-2.0.30}/jvcli/templates/2.0.0/project/env.example +0 -0
  55. {jvcli-2.0.27 → jvcli-2.0.30}/jvcli/templates/2.0.0/project/gitignore.example +0 -0
  56. {jvcli-2.0.27 → jvcli-2.0.30}/jvcli/templates/2.0.0/project/globals.jac +0 -0
  57. {jvcli-2.0.27 → jvcli-2.0.30}/jvcli/templates/2.0.0/project/main.jac +0 -0
  58. {jvcli-2.0.27 → jvcli-2.0.30}/jvcli/templates/2.0.0/project/tests/README.md +0 -0
  59. {jvcli-2.0.27 → jvcli-2.0.30}/jvcli/templates/CHANGELOG.md +0 -0
  60. {jvcli-2.0.27 → jvcli-2.0.30}/jvcli/templates/README.md +0 -0
  61. {jvcli-2.0.27 → jvcli-2.0.30}/jvcli/utils.py +0 -0
  62. {jvcli-2.0.27 → jvcli-2.0.30}/jvcli.egg-info/SOURCES.txt +0 -0
  63. {jvcli-2.0.27 → jvcli-2.0.30}/jvcli.egg-info/dependency_links.txt +0 -0
  64. {jvcli-2.0.27 → jvcli-2.0.30}/jvcli.egg-info/entry_points.txt +0 -0
  65. {jvcli-2.0.27 → jvcli-2.0.30}/jvcli.egg-info/requires.txt +0 -0
  66. {jvcli-2.0.27 → jvcli-2.0.30}/jvcli.egg-info/top_level.txt +0 -0
  67. {jvcli-2.0.27 → jvcli-2.0.30}/setup.cfg +0 -0
  68. {jvcli-2.0.27 → jvcli-2.0.30}/setup.py +0 -0
  69. {jvcli-2.0.27 → jvcli-2.0.30}/tests/test_api.py +0 -0
  70. {jvcli-2.0.27 → jvcli-2.0.30}/tests/test_auth.py +0 -0
  71. {jvcli-2.0.27 → jvcli-2.0.30}/tests/test_clean.py +0 -0
  72. {jvcli-2.0.27 → jvcli-2.0.30}/tests/test_create.py +0 -0
  73. {jvcli-2.0.27 → jvcli-2.0.30}/tests/test_download.py +0 -0
  74. {jvcli-2.0.27 → jvcli-2.0.30}/tests/test_info.py +0 -0
  75. {jvcli-2.0.27 → jvcli-2.0.30}/tests/test_publish.py +0 -0
  76. {jvcli-2.0.27 → jvcli-2.0.30}/tests/test_render_basic.py +0 -0
  77. {jvcli-2.0.27 → jvcli-2.0.30}/tests/test_server.py +0 -0
  78. {jvcli-2.0.27 → jvcli-2.0.30}/tests/test_startproject.py +0 -0
  79. {jvcli-2.0.27 → jvcli-2.0.30}/tests/test_studio.py +0 -0
  80. {jvcli-2.0.27 → jvcli-2.0.30}/tests/test_update.py +0 -0
  81. {jvcli-2.0.27 → jvcli-2.0.30}/tests/test_utils.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: jvcli
3
- Version: 2.0.27
3
+ Version: 2.0.30
4
4
  Summary: CLI tool for Jivas Package Repository
5
5
  Home-page: https://github.com/TrueSelph/jvcli
6
6
  Author: TrueSelph Inc.
@@ -4,5 +4,5 @@ jvcli package initialization.
4
4
  This package provides the CLI tool for Jivas Package Repository.
5
5
  """
6
6
 
7
- __version__ = "2.0.27"
7
+ __version__ = "2.0.30"
8
8
  __supported__jivas__versions__ = ["2.0.0"]
@@ -57,6 +57,7 @@ def call_api(
57
57
  json_data: Optional[Dict] = None,
58
58
  files: Optional[List] = None,
59
59
  data: Optional[Dict] = None,
60
+ timeout: int = 10,
60
61
  ) -> Optional[requests.Response]:
61
62
  """Generic function to call an API endpoint."""
62
63
 
@@ -77,6 +78,7 @@ def call_api(
77
78
  json=json_data,
78
79
  files=files,
79
80
  data=data,
81
+ timeout=timeout,
80
82
  )
81
83
 
82
84
  if response.status_code == 401:
@@ -21,9 +21,9 @@ def transcribe_audio(token: str, agent_id: str, file: bytes) -> dict:
21
21
 
22
22
  data = {
23
23
  "args": "{}",
24
- "module_root": "actions.jivas.deepgram_stt_action",
24
+ "module_root": "jivas.agent.action",
25
25
  "agent_id": agent_id,
26
- "walker": "transcribe_audio",
26
+ "walker": "invoke_stt_action",
27
27
  }
28
28
 
29
29
  headers = {"Authorization": f"Bearer {token}"}
@@ -35,7 +35,6 @@ def transcribe_audio(token: str, agent_id: str, file: bytes) -> dict:
35
35
 
36
36
  # Parse JSON response
37
37
  result = response.json()
38
-
39
38
  return result
40
39
 
41
40
 
@@ -47,29 +46,37 @@ def render(router: StreamlitRouter) -> None:
47
46
  st.header("Chat", divider=True)
48
47
  tts_on = st.toggle("TTS")
49
48
 
49
+ message = ""
50
+ # Handle audio input first
50
51
  audio_value = st.audio_input("Record a voice message")
51
- if audio_value:
52
- selected_agent = st.session_state.get("selected_agent")
53
- result = transcribe_audio(ctx["token"], selected_agent, audio_value)
54
- if result.get("success", False):
55
- send_message(
56
- result["transcript"], url, ctx["token"], selected_agent, tts_on
57
- )
52
+ # Get selected agent from query params
53
+ selected_agent = st.query_params.get("agent")
58
54
 
59
- if selected_agent := st.query_params.get("agent"):
55
+ if selected_agent:
60
56
  chat_messages = st.session_state.messages.get(selected_agent, [])
61
57
 
62
58
  # Display chat messages from history on app rerun
63
- for message in chat_messages:
64
- with st.chat_message(message["role"]):
65
- st.markdown(message["content"])
66
- if payload := message.get("payload"):
59
+ for item in chat_messages:
60
+ role = item.get("role", "user")
61
+ content = item.get("content", "")
62
+ with st.chat_message(role):
63
+ st.markdown(content)
64
+ if payload := item.get("payload"):
67
65
  with st.expander("...", False):
68
66
  st.json(payload)
69
67
 
70
- # Accept user input
71
- if prompt := st.chat_input("Type your message here"):
72
- send_message(prompt, url, ctx["token"], selected_agent, tts_on)
68
+ # Process audio input if available
69
+ if audio_value and selected_agent:
70
+ result = transcribe_audio(ctx["token"], selected_agent, audio_value)
71
+ if result and result.get("success", False):
72
+ message = result["transcript"]
73
+
74
+ # Otherwise handle text input
75
+ if input := st.chat_input("Type your message here"):
76
+ message = input
77
+
78
+ if message:
79
+ send_message(message, url, ctx["token"], selected_agent, tts_on)
73
80
 
74
81
 
75
82
  def send_message(
@@ -43,14 +43,6 @@ def create() -> None:
43
43
  default="No description provided.",
44
44
  help="Description of the action.",
45
45
  )
46
- @click.option(
47
- "--type",
48
- "--type",
49
- default="action",
50
- type=click.Choice(TYPE_SUFFIX_MAP.keys(), case_sensitive=False),
51
- show_default=True,
52
- help="Type of the action.",
53
- )
54
46
  @click.option(
55
47
  "--singleton",
56
48
  default=True,
@@ -58,6 +50,13 @@ def create() -> None:
58
50
  show_default=True,
59
51
  help="Indicate if the action is singleton.",
60
52
  )
53
+ @click.option(
54
+ "--type",
55
+ default="action",
56
+ type=click.Choice(TYPE_SUFFIX_MAP.keys(), case_sensitive=False),
57
+ show_default=True,
58
+ help="Type of the action.",
59
+ )
61
60
  @click.option(
62
61
  "--path",
63
62
  default="./actions",
@@ -69,19 +68,6 @@ def create() -> None:
69
68
  default=None,
70
69
  help="Namespace for the action. Defaults to the username in the token.",
71
70
  )
72
- @click.option(
73
- "--singleton",
74
- default=True,
75
- type=bool,
76
- show_default=True,
77
- help="Indicate if the action is singleton.",
78
- )
79
- @click.option(
80
- "--path",
81
- default="./actions",
82
- show_default=True,
83
- help="Directory to create the action folder in.",
84
- )
85
71
  def create_action(
86
72
  name: str,
87
73
  version: str,
@@ -244,7 +230,7 @@ def render(router: StreamlitRouter, agent_id: str, action_id: str, info: dict) -
244
230
  \"\"\"
245
231
 
246
232
  # Add app header controls
247
- (model_key, module_root) = app_header(agent_id, action_id, info)
233
+ (model_key, action) = app_header(agent_id, action_id, info)
248
234
 
249
235
  # Add app main controls
250
236
  app_controls(agent_id, action_id)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: jvcli
3
- Version: 2.0.27
3
+ Version: 2.0.30
4
4
  Summary: CLI tool for Jivas Package Repository
5
5
  Home-page: https://github.com/TrueSelph/jvcli
6
6
  Author: TrueSelph Inc.
@@ -40,6 +40,5 @@ class TestCli:
40
40
  """Test that CLI displays usage information when no command is provided."""
41
41
  runner = click.testing.CliRunner()
42
42
  result = runner.invoke(jvcli)
43
- assert result.exit_code == 0
44
43
  assert "Usage:" in result.output
45
44
  assert "Commands:" in result.output
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