jvcli 2.0.7__tar.gz → 2.0.9__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 (75) hide show
  1. {jvcli-2.0.7/jvcli.egg-info → jvcli-2.0.9}/PKG-INFO +1 -1
  2. {jvcli-2.0.7 → jvcli-2.0.9}/jvcli/__init__.py +1 -1
  3. {jvcli-2.0.7 → jvcli-2.0.9}/jvcli/client/app.py +27 -13
  4. {jvcli-2.0.7 → jvcli-2.0.9}/jvcli/commands/startproject.py +19 -9
  5. jvcli-2.0.9/jvcli/templates/2.0.0/project/README.md +43 -0
  6. jvcli-2.0.9/jvcli/templates/2.0.0/project/actions/README.md +41 -0
  7. jvcli-2.0.9/jvcli/templates/2.0.0/project/daf/README.md +39 -0
  8. {jvcli-2.0.7 → jvcli-2.0.9}/jvcli/templates/2.0.0/project/env.example +1 -1
  9. jvcli-2.0.9/jvcli/templates/2.0.0/project/sh/exportenv.sh +12 -0
  10. jvcli-2.0.9/jvcli/templates/2.0.0/project/sh/importagent.sh +36 -0
  11. jvcli-2.0.9/jvcli/templates/2.0.0/project/sh/initagents.sh +34 -0
  12. jvcli-2.0.9/jvcli/templates/2.0.0/project/sh/inituser.sh +50 -0
  13. jvcli-2.0.9/jvcli/templates/2.0.0/project/sh/serve.sh +7 -0
  14. jvcli-2.0.9/jvcli/templates/2.0.0/project/sh/startclient.sh +7 -0
  15. jvcli-2.0.9/jvcli/templates/2.0.0/project/tests/README.md +25 -0
  16. {jvcli-2.0.7 → jvcli-2.0.9/jvcli.egg-info}/PKG-INFO +1 -1
  17. {jvcli-2.0.7 → jvcli-2.0.9}/jvcli.egg-info/SOURCES.txt +10 -0
  18. {jvcli-2.0.7 → jvcli-2.0.9}/tests/test_startproject.py +17 -2
  19. {jvcli-2.0.7 → jvcli-2.0.9}/LICENSE +0 -0
  20. {jvcli-2.0.7 → jvcli-2.0.9}/MANIFEST.in +0 -0
  21. {jvcli-2.0.7 → jvcli-2.0.9}/README.md +0 -0
  22. {jvcli-2.0.7 → jvcli-2.0.9}/jvcli/api.py +0 -0
  23. {jvcli-2.0.7 → jvcli-2.0.9}/jvcli/auth.py +0 -0
  24. {jvcli-2.0.7 → jvcli-2.0.9}/jvcli/cli.py +0 -0
  25. {jvcli-2.0.7 → jvcli-2.0.9}/jvcli/client/__init__.py +0 -0
  26. {jvcli-2.0.7 → jvcli-2.0.9}/jvcli/client/lib/__init__.py +0 -0
  27. {jvcli-2.0.7 → jvcli-2.0.9}/jvcli/client/lib/page.py +0 -0
  28. {jvcli-2.0.7 → jvcli-2.0.9}/jvcli/client/lib/utils.py +0 -0
  29. {jvcli-2.0.7 → jvcli-2.0.9}/jvcli/client/lib/widgets.py +0 -0
  30. {jvcli-2.0.7 → jvcli-2.0.9}/jvcli/client/pages/__init__.py +0 -0
  31. {jvcli-2.0.7 → jvcli-2.0.9}/jvcli/client/pages/analytics_page.py +0 -0
  32. {jvcli-2.0.7 → jvcli-2.0.9}/jvcli/client/pages/chat_page.py +0 -0
  33. {jvcli-2.0.7 → jvcli-2.0.9}/jvcli/client/pages/dashboard_page.py +0 -0
  34. {jvcli-2.0.7 → jvcli-2.0.9}/jvcli/client/pages/graph_page.py +0 -0
  35. {jvcli-2.0.7 → jvcli-2.0.9}/jvcli/commands/__init__.py +0 -0
  36. {jvcli-2.0.7 → jvcli-2.0.9}/jvcli/commands/auth.py +0 -0
  37. {jvcli-2.0.7 → jvcli-2.0.9}/jvcli/commands/client.py +0 -0
  38. {jvcli-2.0.7 → jvcli-2.0.9}/jvcli/commands/create.py +0 -0
  39. {jvcli-2.0.7 → jvcli-2.0.9}/jvcli/commands/download.py +0 -0
  40. {jvcli-2.0.7 → jvcli-2.0.9}/jvcli/commands/info.py +0 -0
  41. {jvcli-2.0.7 → jvcli-2.0.9}/jvcli/commands/publish.py +0 -0
  42. {jvcli-2.0.7 → jvcli-2.0.9}/jvcli/commands/studio.py +0 -0
  43. {jvcli-2.0.7 → jvcli-2.0.9}/jvcli/commands/update.py +0 -0
  44. {jvcli-2.0.7 → jvcli-2.0.9}/jvcli/studio/assets/index-BtFItD2q.js +0 -0
  45. {jvcli-2.0.7 → jvcli-2.0.9}/jvcli/studio/assets/index-CIEsu-TC.css +0 -0
  46. {jvcli-2.0.7 → jvcli-2.0.9}/jvcli/studio/index.html +0 -0
  47. {jvcli-2.0.7 → jvcli-2.0.9}/jvcli/studio/jac_logo.png +0 -0
  48. {jvcli-2.0.7 → jvcli-2.0.9}/jvcli/studio/tauri.svg +0 -0
  49. {jvcli-2.0.7 → jvcli-2.0.9}/jvcli/studio/vite.svg +0 -0
  50. {jvcli-2.0.7 → jvcli-2.0.9}/jvcli/templates/2.0.0/action_info.yaml +0 -0
  51. {jvcli-2.0.7 → jvcli-2.0.9}/jvcli/templates/2.0.0/agent_descriptor.yaml +0 -0
  52. {jvcli-2.0.7 → jvcli-2.0.9}/jvcli/templates/2.0.0/agent_info.yaml +0 -0
  53. {jvcli-2.0.7 → jvcli-2.0.9}/jvcli/templates/2.0.0/agent_knowledge.yaml +0 -0
  54. {jvcli-2.0.7 → jvcli-2.0.9}/jvcli/templates/2.0.0/agent_memory.yaml +0 -0
  55. {jvcli-2.0.7 → jvcli-2.0.9}/jvcli/templates/2.0.0/project/globals.jac +0 -0
  56. {jvcli-2.0.7 → jvcli-2.0.9}/jvcli/templates/2.0.0/project/main.jac +0 -0
  57. {jvcli-2.0.7 → jvcli-2.0.9}/jvcli/templates/CHANGELOG.md +0 -0
  58. {jvcli-2.0.7 → jvcli-2.0.9}/jvcli/templates/README.md +0 -0
  59. {jvcli-2.0.7 → jvcli-2.0.9}/jvcli/utils.py +0 -0
  60. {jvcli-2.0.7 → jvcli-2.0.9}/jvcli.egg-info/dependency_links.txt +0 -0
  61. {jvcli-2.0.7 → jvcli-2.0.9}/jvcli.egg-info/entry_points.txt +0 -0
  62. {jvcli-2.0.7 → jvcli-2.0.9}/jvcli.egg-info/requires.txt +0 -0
  63. {jvcli-2.0.7 → jvcli-2.0.9}/jvcli.egg-info/top_level.txt +0 -0
  64. {jvcli-2.0.7 → jvcli-2.0.9}/setup.cfg +0 -0
  65. {jvcli-2.0.7 → jvcli-2.0.9}/setup.py +0 -0
  66. {jvcli-2.0.7 → jvcli-2.0.9}/tests/test_api.py +0 -0
  67. {jvcli-2.0.7 → jvcli-2.0.9}/tests/test_auth.py +0 -0
  68. {jvcli-2.0.7 → jvcli-2.0.9}/tests/test_cli.py +0 -0
  69. {jvcli-2.0.7 → jvcli-2.0.9}/tests/test_create.py +0 -0
  70. {jvcli-2.0.7 → jvcli-2.0.9}/tests/test_download.py +0 -0
  71. {jvcli-2.0.7 → jvcli-2.0.9}/tests/test_info.py +0 -0
  72. {jvcli-2.0.7 → jvcli-2.0.9}/tests/test_publish.py +0 -0
  73. {jvcli-2.0.7 → jvcli-2.0.9}/tests/test_studio.py +0 -0
  74. {jvcli-2.0.7 → jvcli-2.0.9}/tests/test_update.py +0 -0
  75. {jvcli-2.0.7 → jvcli-2.0.9}/tests/test_utils.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: jvcli
3
- Version: 2.0.7
3
+ Version: 2.0.9
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.7"
7
+ __version__ = "2.0.9"
8
8
  __supported__jivas__versions__ = ["2.0.0"]
@@ -26,22 +26,36 @@ def login_form() -> None:
26
26
  """Render the login form and handle login logic."""
27
27
  login_url = f"{JIVAS_URL}/user/login"
28
28
 
29
- with st.container(border=True):
30
- st.header("Login")
29
+ if os.environ.get("JIVAS_ENVIRONMENT") == "development":
30
+ email = os.environ.get("JIVAS_USER", "admin@jivas.com")
31
+ password = os.environ.get("JIVAS_PASSWORD", "password")
31
32
 
32
- email = st.text_input("Email")
33
- password = st.text_input("Password", type="password")
33
+ response = requests.post(login_url, json={"email": email, "password": password})
34
34
 
35
- if st.button("Login"):
36
- response = requests.post(
37
- login_url, json={"email": email, "password": password}
38
- )
35
+ if response.status_code == 200:
36
+ st.session_state.ROOT_ID = response.json()["user"]["root_id"]
37
+ st.session_state.TOKEN = response.json()["token"]
38
+ st.session_state.EXPIRATION = response.json()["user"]["expiration"]
39
+ st.rerun()
40
+
41
+ else:
42
+
43
+ with st.container(border=True):
44
+ st.header("Login")
45
+
46
+ email = st.text_input("Email")
47
+ password = st.text_input("Password", type="password")
48
+
49
+ if st.button("Login"):
50
+ response = requests.post(
51
+ login_url, json={"email": email, "password": password}
52
+ )
39
53
 
40
- if response.status_code == 200:
41
- st.session_state.ROOT_ID = response.json()["user"]["root_id"]
42
- st.session_state.TOKEN = response.json()["token"]
43
- st.session_state.EXPIRATION = response.json()["user"]["expiration"]
44
- st.rerun()
54
+ if response.status_code == 200:
55
+ st.session_state.ROOT_ID = response.json()["user"]["root_id"]
56
+ st.session_state.TOKEN = response.json()["token"]
57
+ st.session_state.EXPIRATION = response.json()["user"]["expiration"]
58
+ st.rerun()
45
59
 
46
60
 
47
61
  def main() -> None:
@@ -33,7 +33,7 @@ def startproject(project_name: str, version: str) -> None:
33
33
  "tests": [],
34
34
  "actions": [],
35
35
  "daf": [],
36
- "scripts": [],
36
+ "sh": [],
37
37
  }
38
38
 
39
39
  try:
@@ -44,18 +44,28 @@ def startproject(project_name: str, version: str) -> None:
44
44
  for folder in project_structure.keys():
45
45
  os.makedirs(os.path.join(project_name, folder), exist_ok=True)
46
46
 
47
- # Copy template files from the selected version
48
- for filename in ["main.jac", "globals.jac", "env.example"]:
49
- template_file_path = os.path.join(template_path, filename)
50
- if os.path.exists(template_file_path):
47
+ # Copy template files and folders from the selected version
48
+ for root, dirs, files in os.walk(template_path):
49
+ relative_path = os.path.relpath(root, template_path)
50
+ target_dir = os.path.join(project_name, relative_path)
51
+
52
+ # Create directories
53
+ for dir_name in dirs:
54
+ os.makedirs(os.path.join(target_dir, dir_name), exist_ok=True)
55
+
56
+ # Copy files
57
+ for file_name in files:
58
+ template_file_path = os.path.join(root, file_name)
59
+ target_file_path = os.path.join(target_dir, file_name)
60
+
51
61
  with open(template_file_path, "r") as template_file:
52
62
  contents = template_file.read()
53
63
 
54
64
  # Write `.env` instead of `env.example`
55
- target_filename = ".env" if filename == "env.example" else filename
56
- with open(
57
- os.path.join(project_name, target_filename), "w"
58
- ) as project_file:
65
+ if file_name == "env.example":
66
+ target_file_path = os.path.join(target_dir, ".env")
67
+
68
+ with open(target_file_path, "w") as project_file:
59
69
  project_file.write(contents)
60
70
 
61
71
  click.secho(
@@ -0,0 +1,43 @@
1
+ # Getting Started with JIVAS
2
+
3
+ Welcome to your JIVAS AI project boilerplate!
4
+
5
+ ## Running Your JIVAS App
6
+
7
+ To start your JIVAS app, execute the following command within this project folder:
8
+
9
+ ```sh
10
+ sh sh/serve.sh
11
+ ```
12
+
13
+ ## Setting Up a Demo Agent
14
+
15
+ To set up a demo agent, run the following command in another terminal:
16
+
17
+ ```sh
18
+ sh sh/importagent.sh
19
+ ```
20
+
21
+ This will initialize JIVAS, download, and install a demo agent.
22
+
23
+ ## Accessing the JIVAS Manager
24
+
25
+ Once the setup is complete, run the following command in its own terminal to access the JIVAS manager for configuring and chatting with your agent:
26
+
27
+ ```sh
28
+ sh sh/startclient.sh
29
+ ```
30
+
31
+ ## Reflecting Changes to Agent Actions
32
+
33
+ If you make any changes to the agent actions, run the following command to reinitialize all agents running within this JIVAS app:
34
+
35
+ ```sh
36
+ sh sh/initagents.sh
37
+ ```
38
+
39
+ ## Logging In
40
+
41
+ When the JIVAS manager loads, log in with the default JIVAS credentials found in your `.env` file.
42
+
43
+ Happy building!
@@ -0,0 +1,41 @@
1
+ # Custom Actions
2
+
3
+ This directory is designated for custom or downloaded actions.
4
+
5
+ ## Instructions
6
+
7
+ 1. **Create Your Custom Actions**: Place your custom action scripts in this folder.
8
+ 2. **Naming Convention**: Use clear and descriptive names for your action files to ensure they are easily identifiable.
9
+ 3. **Permissions**: Ensure your scripts have the appropriate permissions to be executed.
10
+
11
+ ## Creating a Custom Action with jvcli
12
+
13
+ To create a custom action using `jvcli`, follow these steps:
14
+
15
+ 1. **Run the Command**: Use the following command to create a new action:
16
+ ```sh
17
+ jvcli create action --name your_action_name --description "Your action description"
18
+ ```
19
+ Replace `your_action_name` with the desired name for your action in snake_case.
20
+
21
+ 2. **Options**: You can customize the creation process with various options:
22
+ - `--version`: Specify the version of the action. Default is `0.0.1`.
23
+ - `--jivas_version`: Specify the version of Jivas. Default is `2.0.0`.
24
+ - `--type`: Define the type of action (`action`, `interact_action`, or `vector_store_action`). Default is `action`.
25
+ - `--singleton`: Indicate if the action is singleton. Default is `True`.
26
+ - `--path`: Directory to create the action folder in. Default is `./actions`.
27
+ - `--namespace`: Namespace for the action. Defaults to the username in the token.
28
+
29
+ 3. **Example**:
30
+ ```sh
31
+ jvcli create action --name my_custom_action --description "This is a custom action" --type action
32
+ ```
33
+
34
+ For more information, refer to the project's documentation.
35
+
36
+ ## Notes
37
+
38
+ - Custom actions should be thoroughly tested before deployment.
39
+ - Follow best practices for scripting and error handling.
40
+
41
+ For more information, refer to the project's documentation.
@@ -0,0 +1,39 @@
1
+ # Digital Agent Freight (DAF) Packages
2
+
3
+ This directory is for your custom or downloaded Digital Agent Freight (DAF) packages. DAFs contain all configurations, knowledge, and memory snapshots for a JIVAS AI agent.
4
+
5
+ ## Instructions
6
+
7
+ 1. **Create Your DAF Packages**: Place your custom or downloaded DAF packages in this folder.
8
+ 2. **Naming Convention**: Use clear and descriptive names for your DAF packages to ensure they are easily identifiable.
9
+ 3. **Permissions**: Ensure your packages have the appropriate permissions to be accessed and executed.
10
+
11
+ ## Creating a Starter DAF Package with jvcli
12
+
13
+ To create a new DAF package using `jvcli`, follow these steps:
14
+
15
+ 1. **Run the Command**: Use the following command to create a new DAF package:
16
+ ```sh
17
+ jvcli create agent --name your_agent_name --description "Your agent description"
18
+ ```
19
+ Replace `your_agent_name` with the desired name for your agent in snake_case.
20
+
21
+ 2. **Options**: You can customize the creation process with various options:
22
+ - `--version`: Specify the version of the agent. Default is `0.0.1`.
23
+ - `--jivas_version`: Specify the version of Jivas. Default is `2.0.0`.
24
+ - `--path`: Directory to create the agent folder in. Default is `./dafs`.
25
+ - `--namespace`: Namespace for the agent. Defaults to the username in the token.
26
+
27
+ 3. **Example**:
28
+ ```sh
29
+ jvcli create agent --name my_agent --description "My custom JIVAS AI agent"
30
+ ```
31
+
32
+ For more information, refer to the project's documentation.
33
+
34
+ ## Notes
35
+
36
+ - DAF packages should be thoroughly tested before deployment.
37
+ - Follow best practices for configuration and error handling.
38
+
39
+ For more information, refer to the project's documentation.
@@ -3,7 +3,7 @@ JIVAS_PASSWORD=password
3
3
  JIVAS_PORT=8000
4
4
  JIVAS_BASE_URL=http://localhost:8000
5
5
  JIVAS_STUDIO_URL=http://localhost:8989
6
- JIVAS_FILES_URL=http://localhost:8000/files
6
+ JIVAS_FILES_URL=http://localhost:9000/files
7
7
  JIVAS_DESCRIPTOR_ROOT_PATH=".jvdata"
8
8
  JIVAS_ACTIONS_ROOT_PATH="actions"
9
9
  JIVAS_DAF_ROOT_PATH="daf"
@@ -0,0 +1,12 @@
1
+ #!/bin/bash
2
+
3
+ # Export env vars
4
+ set -o allexport
5
+ if [ -f .env ]; then
6
+ source .env
7
+ else
8
+ echo ".env file not found"
9
+ exit 1
10
+ fi
11
+ set +o allexport
12
+ printenv
@@ -0,0 +1,36 @@
1
+ #!/bin/bash
2
+ # Script to create jivas user, login, and initialize jivas graph
3
+
4
+ # Export env vars
5
+ source sh/exportenv.sh
6
+
7
+ # Init the user token
8
+ source sh/inituser.sh
9
+
10
+ # Check if JIVAS_TOKEN is set
11
+ if [ -n "$JIVAS_TOKEN" ]; then
12
+
13
+ echo -e "\n\nImporting demo agent...\n"
14
+ # Import the agent
15
+ AGENT_ID=$(curl --silent --show-error --no-progress-meter \
16
+ --request POST \
17
+ --header 'Content-Type: application/json' \
18
+ --header 'Accept: application/json' \
19
+ --header "Authorization: Bearer $JIVAS_TOKEN" \
20
+ --data '{"daf_name": "jivas/eldon_ai"}' \
21
+ "http://localhost:$JIVAS_PORT/walker/import_agent" | grep -o '"id":"[^"]*' | sed 's/"id":"//')
22
+
23
+ if [ -z "$AGENT_ID" ]; then
24
+ echo "Failed to import agent. Exiting..."
25
+ exit 1
26
+ fi
27
+
28
+ echo -e "Agent ID: $AGENT_ID\n"
29
+ else
30
+ echo "Failed to initialize user token. Exiting..."
31
+ exit 1
32
+ fi
33
+
34
+
35
+
36
+
@@ -0,0 +1,34 @@
1
+ #!/bin/bash
2
+ # Script to authenticate and initialize jivas agents
3
+
4
+ # Export env vars
5
+ source sh/exportenv.sh
6
+
7
+ # Init the user token
8
+ source sh/inituser.sh
9
+
10
+ # Check if JIVAS_TOKEN is set
11
+ if [ -n "$JIVAS_TOKEN" ]; then
12
+
13
+ echo -e "\n\Initializing agents...\n"
14
+
15
+ # Initialize agents and capture the response
16
+ response=$(curl --silent --show-error --no-progress-meter \
17
+ --request POST \
18
+ -H 'accept: application/json' \
19
+ -H 'Content-Type: application/json' \
20
+ -H "Authorization: Bearer $JIVAS_TOKEN" \
21
+ --data '{"reporting":"true"}' \
22
+ "http://localhost:$JIVAS_PORT/walker/init_agents")
23
+
24
+ # Parse the response to extract the list of "id"s without using jq
25
+ ids=$(echo "$response" | grep -o '"id":"[^"]*"' | sed -e 's/"id":"//g' -e 's/"//g')
26
+
27
+ # Output the list of "id"s
28
+ echo "Initialized Agents:"
29
+ echo "$ids \n"
30
+
31
+ else
32
+ echo "Failed to initialize user token. Exiting..."
33
+ exit 1
34
+ fi
@@ -0,0 +1,50 @@
1
+ #!/bin/bash
2
+ # Script to init jivas user and grab token
3
+
4
+ # Check if required environment variables are set
5
+ if [ -z "$JIVAS_PORT" ] || [ -z "$JIVAS_PASSWORD" ] || [ -z "$JIVAS_USER" ]; then
6
+ echo "Required environment variables (JIVAS_PORT, JIVAS_PASSWORD, JIVAS_USER) are not set. Exiting..."
7
+ exit 1
8
+ fi
9
+
10
+ if lsof -i :$JIVAS_PORT >/dev/null; then
11
+
12
+ # Try to login first
13
+ JIVAS_TOKEN=$(curl --silent --show-error --no-progress-meter \
14
+ --request POST \
15
+ --header 'Content-Type: application/json' \
16
+ --header 'Accept: application/json' \
17
+ --data '{"password": "'"$JIVAS_PASSWORD"'","email": "'"$JIVAS_USER"'"}' \
18
+ "http://localhost:$JIVAS_PORT/user/login" | grep -o '"token":"[^"]*' | sed 's/"token":"//')
19
+
20
+ # Check if login was successful
21
+ if [ -z "$JIVAS_TOKEN" ] || [ "$JIVAS_TOKEN" == "null" ]; then
22
+ echo "Login failed. Registering user..."
23
+
24
+ # Register user if login failed
25
+ curl --silent --show-error --no-progress-meter \
26
+ --request POST \
27
+ --header 'Content-Type: application/json' \
28
+ --header 'Accept: application/json' \
29
+ --data '{
30
+ "password": "'"$JIVAS_PASSWORD"'",
31
+ "email": "'"$JIVAS_USER"'"
32
+ }' \
33
+ "http://localhost:$JIVAS_PORT/user/register"
34
+
35
+ # Attempt to login again after registration
36
+ JIVAS_TOKEN=$(curl --silent --show-error --no-progress-meter \
37
+ --request POST \
38
+ --header 'Content-Type: application/json' \
39
+ --header 'Accept: application/json' \
40
+ --data '{"password": "'"$JIVAS_PASSWORD"'","email": "'"$JIVAS_USER"'"}' \
41
+ "http://localhost:$JIVAS_PORT/user/login" | grep -oP '(?<="token":")[^"]*')
42
+ fi
43
+
44
+ # Print token
45
+ echo "\n JIVAS token: $JIVAS_TOKEN"
46
+
47
+ else
48
+ echo "Server is not running on port $JIVAS_PORT. Exiting..."
49
+ exit 1
50
+ fi
@@ -0,0 +1,7 @@
1
+ #!/bin/bash
2
+ # Script to serve jivas app
3
+
4
+ source sh/exportenv.sh
5
+
6
+ # serve jivas app
7
+ jac jvserve main.jac
@@ -0,0 +1,7 @@
1
+ #!/bin/bash
2
+ # Script to serve jivas client app
3
+
4
+ source sh/exportenv.sh
5
+
6
+ # launch jivas client app
7
+ jvcli client launch
@@ -0,0 +1,25 @@
1
+ # Test Cases
2
+
3
+ This directory is designated for custom test cases.
4
+
5
+ ## Instructions
6
+
7
+ 1. **Create Your Test Cases**: Place your test case scripts in this folder.
8
+ 2. **Naming Convention**: Use clear and descriptive names for your test files to ensure they are easily identifiable.
9
+
10
+ ## Writing Test Cases
11
+
12
+ To write effective test cases, follow these guidelines:
13
+
14
+ 1. **Define the Purpose**: Clearly state what the test case is verifying.
15
+ 2. **Setup**: Prepare the necessary environment and inputs for the test.
16
+ 3. **Execution**: Describe the steps to execute the test.
17
+ 4. **Validation**: Specify the expected outcomes and how to validate them.
18
+ 5. **Teardown**: Clean up any resources or state after the test completes.
19
+
20
+ ## Notes
21
+
22
+ - Test cases should be thoroughly reviewed and tested before deployment.
23
+ - Follow best practices for scripting and error handling.
24
+
25
+ For more information, refer to the project's documentation.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: jvcli
3
- Version: 2.0.7
3
+ Version: 2.0.9
4
4
  Summary: CLI tool for Jivas Package Repository
5
5
  Home-page: https://github.com/TrueSelph/jvcli
6
6
  Author: TrueSelph Inc.
@@ -47,9 +47,19 @@ jvcli/templates/2.0.0/agent_descriptor.yaml
47
47
  jvcli/templates/2.0.0/agent_info.yaml
48
48
  jvcli/templates/2.0.0/agent_knowledge.yaml
49
49
  jvcli/templates/2.0.0/agent_memory.yaml
50
+ jvcli/templates/2.0.0/project/README.md
50
51
  jvcli/templates/2.0.0/project/env.example
51
52
  jvcli/templates/2.0.0/project/globals.jac
52
53
  jvcli/templates/2.0.0/project/main.jac
54
+ jvcli/templates/2.0.0/project/actions/README.md
55
+ jvcli/templates/2.0.0/project/daf/README.md
56
+ jvcli/templates/2.0.0/project/sh/exportenv.sh
57
+ jvcli/templates/2.0.0/project/sh/importagent.sh
58
+ jvcli/templates/2.0.0/project/sh/initagents.sh
59
+ jvcli/templates/2.0.0/project/sh/inituser.sh
60
+ jvcli/templates/2.0.0/project/sh/serve.sh
61
+ jvcli/templates/2.0.0/project/sh/startclient.sh
62
+ jvcli/templates/2.0.0/project/tests/README.md
53
63
  tests/test_api.py
54
64
  tests/test_auth.py
55
65
  tests/test_cli.py
@@ -34,14 +34,29 @@ class TestStartProjectCommand:
34
34
  mock_makedirs.assert_any_call("test_project", exist_ok=True)
35
35
 
36
36
  # Verify subdirectories creation
37
- expected_dirs = ["tests", "actions", "daf", "scripts"]
37
+ expected_dirs = ["tests", "actions", "daf", "sh"]
38
38
  for dir_name in expected_dirs:
39
39
  mock_makedirs.assert_any_call(
40
40
  os.path.join("test_project", dir_name), exist_ok=True
41
41
  )
42
42
 
43
43
  # Verify template files creation
44
- expected_files = ["main.jac", "globals.jac", ".env"]
44
+ expected_files = [
45
+ "main.jac",
46
+ "globals.jac",
47
+ ".env",
48
+ "README.md",
49
+ "actions/README.md",
50
+ "daf/README.md",
51
+ "sh/initagents.sh",
52
+ "sh/importagent.sh",
53
+ "sh/serve.sh",
54
+ "sh/exportenv.sh",
55
+ "sh/inituser.sh",
56
+ "sh/startclient.sh",
57
+ "tests/README.md",
58
+ ]
59
+
45
60
  mock_calls = mock_open.mock_calls
46
61
  written_files = [
47
62
  call.args[0] for call in mock_calls if "test_project" in str(call)
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