jvcli 2.0.11__tar.gz → 2.0.13__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.11/jvcli.egg-info → jvcli-2.0.13}/PKG-INFO +1 -1
- {jvcli-2.0.11 → jvcli-2.0.13}/jvcli/__init__.py +1 -1
- {jvcli-2.0.11 → jvcli-2.0.13}/jvcli/commands/startproject.py +16 -2
- jvcli-2.0.13/jvcli/templates/2.0.0/project/gitignore.example +53 -0
- {jvcli-2.0.11 → jvcli-2.0.13}/jvcli/templates/2.0.0/project/sh/exportenv.sh +2 -2
- {jvcli-2.0.11 → jvcli-2.0.13}/jvcli/templates/2.0.0/project/sh/importagent.sh +4 -4
- {jvcli-2.0.11 → jvcli-2.0.13}/jvcli/templates/2.0.0/project/sh/initagents.sh +2 -2
- {jvcli-2.0.11 → jvcli-2.0.13}/jvcli/templates/2.0.0/project/sh/inituser.sh +1 -1
- {jvcli-2.0.11 → jvcli-2.0.13}/jvcli/templates/2.0.0/project/sh/serve.sh +1 -1
- {jvcli-2.0.11 → jvcli-2.0.13}/jvcli/templates/2.0.0/project/sh/startclient.sh +1 -1
- {jvcli-2.0.11 → jvcli-2.0.13/jvcli.egg-info}/PKG-INFO +1 -1
- {jvcli-2.0.11 → jvcli-2.0.13}/jvcli.egg-info/SOURCES.txt +1 -0
- {jvcli-2.0.11 → jvcli-2.0.13}/tests/test_startproject.py +13 -4
- {jvcli-2.0.11 → jvcli-2.0.13}/LICENSE +0 -0
- {jvcli-2.0.11 → jvcli-2.0.13}/MANIFEST.in +0 -0
- {jvcli-2.0.11 → jvcli-2.0.13}/README.md +0 -0
- {jvcli-2.0.11 → jvcli-2.0.13}/jvcli/api.py +0 -0
- {jvcli-2.0.11 → jvcli-2.0.13}/jvcli/auth.py +0 -0
- {jvcli-2.0.11 → jvcli-2.0.13}/jvcli/cli.py +0 -0
- {jvcli-2.0.11 → jvcli-2.0.13}/jvcli/client/__init__.py +0 -0
- {jvcli-2.0.11 → jvcli-2.0.13}/jvcli/client/app.py +0 -0
- {jvcli-2.0.11 → jvcli-2.0.13}/jvcli/client/lib/__init__.py +0 -0
- {jvcli-2.0.11 → jvcli-2.0.13}/jvcli/client/lib/page.py +0 -0
- {jvcli-2.0.11 → jvcli-2.0.13}/jvcli/client/lib/utils.py +0 -0
- {jvcli-2.0.11 → jvcli-2.0.13}/jvcli/client/lib/widgets.py +0 -0
- {jvcli-2.0.11 → jvcli-2.0.13}/jvcli/client/pages/__init__.py +0 -0
- {jvcli-2.0.11 → jvcli-2.0.13}/jvcli/client/pages/analytics_page.py +0 -0
- {jvcli-2.0.11 → jvcli-2.0.13}/jvcli/client/pages/chat_page.py +0 -0
- {jvcli-2.0.11 → jvcli-2.0.13}/jvcli/client/pages/dashboard_page.py +0 -0
- {jvcli-2.0.11 → jvcli-2.0.13}/jvcli/client/pages/graph_page.py +0 -0
- {jvcli-2.0.11 → jvcli-2.0.13}/jvcli/commands/__init__.py +0 -0
- {jvcli-2.0.11 → jvcli-2.0.13}/jvcli/commands/auth.py +0 -0
- {jvcli-2.0.11 → jvcli-2.0.13}/jvcli/commands/client.py +0 -0
- {jvcli-2.0.11 → jvcli-2.0.13}/jvcli/commands/create.py +0 -0
- {jvcli-2.0.11 → jvcli-2.0.13}/jvcli/commands/download.py +0 -0
- {jvcli-2.0.11 → jvcli-2.0.13}/jvcli/commands/info.py +0 -0
- {jvcli-2.0.11 → jvcli-2.0.13}/jvcli/commands/publish.py +0 -0
- {jvcli-2.0.11 → jvcli-2.0.13}/jvcli/commands/studio.py +0 -0
- {jvcli-2.0.11 → jvcli-2.0.13}/jvcli/commands/update.py +0 -0
- {jvcli-2.0.11 → jvcli-2.0.13}/jvcli/studio/assets/index-DDV79SDu.js +0 -0
- {jvcli-2.0.11 → jvcli-2.0.13}/jvcli/studio/assets/index-DdMMONxd.css +0 -0
- {jvcli-2.0.11 → jvcli-2.0.13}/jvcli/studio/index.html +0 -0
- {jvcli-2.0.11 → jvcli-2.0.13}/jvcli/studio/jac_logo.png +0 -0
- {jvcli-2.0.11 → jvcli-2.0.13}/jvcli/studio/tauri.svg +0 -0
- {jvcli-2.0.11 → jvcli-2.0.13}/jvcli/studio/vite.svg +0 -0
- {jvcli-2.0.11 → jvcli-2.0.13}/jvcli/studio-auth/assets/index-Bh6lyeXA.js +0 -0
- {jvcli-2.0.11 → jvcli-2.0.13}/jvcli/studio-auth/assets/index-DdMMONxd.css +0 -0
- {jvcli-2.0.11 → jvcli-2.0.13}/jvcli/studio-auth/index.html +0 -0
- {jvcli-2.0.11 → jvcli-2.0.13}/jvcli/studio-auth/jac_logo.png +0 -0
- {jvcli-2.0.11 → jvcli-2.0.13}/jvcli/studio-auth/tauri.svg +0 -0
- {jvcli-2.0.11 → jvcli-2.0.13}/jvcli/studio-auth/vite.svg +0 -0
- {jvcli-2.0.11 → jvcli-2.0.13}/jvcli/templates/2.0.0/action_info.yaml +0 -0
- {jvcli-2.0.11 → jvcli-2.0.13}/jvcli/templates/2.0.0/agent_descriptor.yaml +0 -0
- {jvcli-2.0.11 → jvcli-2.0.13}/jvcli/templates/2.0.0/agent_info.yaml +0 -0
- {jvcli-2.0.11 → jvcli-2.0.13}/jvcli/templates/2.0.0/agent_knowledge.yaml +0 -0
- {jvcli-2.0.11 → jvcli-2.0.13}/jvcli/templates/2.0.0/agent_memory.yaml +0 -0
- {jvcli-2.0.11 → jvcli-2.0.13}/jvcli/templates/2.0.0/project/README.md +0 -0
- {jvcli-2.0.11 → jvcli-2.0.13}/jvcli/templates/2.0.0/project/actions/README.md +0 -0
- {jvcli-2.0.11 → jvcli-2.0.13}/jvcli/templates/2.0.0/project/daf/README.md +0 -0
- {jvcli-2.0.11 → jvcli-2.0.13}/jvcli/templates/2.0.0/project/env.example +0 -0
- {jvcli-2.0.11 → jvcli-2.0.13}/jvcli/templates/2.0.0/project/globals.jac +0 -0
- {jvcli-2.0.11 → jvcli-2.0.13}/jvcli/templates/2.0.0/project/main.jac +0 -0
- {jvcli-2.0.11 → jvcli-2.0.13}/jvcli/templates/2.0.0/project/tests/README.md +0 -0
- {jvcli-2.0.11 → jvcli-2.0.13}/jvcli/templates/CHANGELOG.md +0 -0
- {jvcli-2.0.11 → jvcli-2.0.13}/jvcli/templates/README.md +0 -0
- {jvcli-2.0.11 → jvcli-2.0.13}/jvcli/utils.py +0 -0
- {jvcli-2.0.11 → jvcli-2.0.13}/jvcli.egg-info/dependency_links.txt +0 -0
- {jvcli-2.0.11 → jvcli-2.0.13}/jvcli.egg-info/entry_points.txt +0 -0
- {jvcli-2.0.11 → jvcli-2.0.13}/jvcli.egg-info/requires.txt +0 -0
- {jvcli-2.0.11 → jvcli-2.0.13}/jvcli.egg-info/top_level.txt +0 -0
- {jvcli-2.0.11 → jvcli-2.0.13}/setup.cfg +0 -0
- {jvcli-2.0.11 → jvcli-2.0.13}/setup.py +0 -0
- {jvcli-2.0.11 → jvcli-2.0.13}/tests/test_api.py +0 -0
- {jvcli-2.0.11 → jvcli-2.0.13}/tests/test_auth.py +0 -0
- {jvcli-2.0.11 → jvcli-2.0.13}/tests/test_cli.py +0 -0
- {jvcli-2.0.11 → jvcli-2.0.13}/tests/test_create.py +0 -0
- {jvcli-2.0.11 → jvcli-2.0.13}/tests/test_download.py +0 -0
- {jvcli-2.0.11 → jvcli-2.0.13}/tests/test_info.py +0 -0
- {jvcli-2.0.11 → jvcli-2.0.13}/tests/test_publish.py +0 -0
- {jvcli-2.0.11 → jvcli-2.0.13}/tests/test_studio.py +0 -0
- {jvcli-2.0.11 → jvcli-2.0.13}/tests/test_update.py +0 -0
- {jvcli-2.0.11 → jvcli-2.0.13}/tests/test_utils.py +0 -0
@@ -23,6 +23,7 @@ def startproject(project_name: str, version: str) -> None:
|
|
23
23
|
Usage:
|
24
24
|
jvcli startproject <project_name> [--version <jivas_version>]
|
25
25
|
"""
|
26
|
+
|
26
27
|
template_path = os.path.join(TEMPLATES_DIR, version, "project")
|
27
28
|
|
28
29
|
if not os.path.exists(template_path):
|
@@ -61,9 +62,22 @@ def startproject(project_name: str, version: str) -> None:
|
|
61
62
|
with open(template_file_path, "r") as template_file:
|
62
63
|
contents = template_file.read()
|
63
64
|
|
64
|
-
|
65
|
+
if file_name == "gitignore.example":
|
66
|
+
# Write `.gitignore`
|
67
|
+
target_file_path_gitignore = os.path.join(target_dir, ".gitignore")
|
68
|
+
with open(target_file_path_gitignore, "w") as gitignore_file:
|
69
|
+
gitignore_file.write(contents)
|
70
|
+
|
65
71
|
if file_name == "env.example":
|
66
|
-
|
72
|
+
# Write `.env`
|
73
|
+
target_file_path_env = os.path.join(target_dir, ".env")
|
74
|
+
with open(target_file_path_env, "w") as env_file:
|
75
|
+
env_file.write(contents)
|
76
|
+
|
77
|
+
# Write `env.example`
|
78
|
+
target_file_path_example = os.path.join(target_dir, "env.example")
|
79
|
+
with open(target_file_path_example, "w") as example_file:
|
80
|
+
example_file.write(contents)
|
67
81
|
|
68
82
|
with open(target_file_path, "w") as project_file:
|
69
83
|
project_file.write(contents)
|
@@ -0,0 +1,53 @@
|
|
1
|
+
# Python #
|
2
|
+
*.pyc
|
3
|
+
__pycache__
|
4
|
+
venv
|
5
|
+
.pytest_cache
|
6
|
+
__jac_gen__
|
7
|
+
|
8
|
+
# Distribution / packaging
|
9
|
+
.Python
|
10
|
+
play/
|
11
|
+
build/
|
12
|
+
develop-eggs/
|
13
|
+
dist/
|
14
|
+
downloads/
|
15
|
+
eggs/
|
16
|
+
.eggs/
|
17
|
+
lib64/
|
18
|
+
parts/
|
19
|
+
sdist/
|
20
|
+
var/
|
21
|
+
wheels/
|
22
|
+
share/python-wheels/
|
23
|
+
*.egg-info/
|
24
|
+
.installed.cfg
|
25
|
+
*.egg
|
26
|
+
MANIFEST
|
27
|
+
test_source/
|
28
|
+
|
29
|
+
# Others #
|
30
|
+
.coverage
|
31
|
+
.session
|
32
|
+
*.session.db
|
33
|
+
mydatabase/
|
34
|
+
actions/jivas/
|
35
|
+
.DS_Store
|
36
|
+
.vscode
|
37
|
+
build
|
38
|
+
*Zone.Identifier
|
39
|
+
.DS_Store
|
40
|
+
parser.out
|
41
|
+
codegen_output*
|
42
|
+
.qodo
|
43
|
+
.files
|
44
|
+
*.rdb
|
45
|
+
node_modules
|
46
|
+
out.dot
|
47
|
+
out.txt
|
48
|
+
.jvdata
|
49
|
+
.env
|
50
|
+
|
51
|
+
# Mypy files #
|
52
|
+
.mypy_cache*
|
53
|
+
.jac_mypy_cache*
|
@@ -10,22 +10,22 @@ fi
|
|
10
10
|
DAF_NAME="$1"
|
11
11
|
|
12
12
|
# Export env vars
|
13
|
-
source sh/exportenv.sh
|
13
|
+
source ./sh/exportenv.sh
|
14
14
|
|
15
15
|
# Init the user token
|
16
|
-
source sh/inituser.sh
|
16
|
+
source ./sh/inituser.sh
|
17
17
|
|
18
18
|
# Wait until JIVAS_TOKEN is set
|
19
19
|
while [ -z "$JIVAS_TOKEN" ]; do
|
20
20
|
echo "Waiting for JIVAS_TOKEN to be initialized..."
|
21
21
|
sleep 1
|
22
|
-
source sh/inituser.sh
|
22
|
+
source ./sh/inituser.sh
|
23
23
|
done
|
24
24
|
|
25
25
|
# Check if JIVAS_TOKEN is set
|
26
26
|
if [ -n "$JIVAS_TOKEN" ]; then
|
27
27
|
|
28
|
-
echo -e "\n\nImporting
|
28
|
+
echo -e "\n\nImporting agent...\n"
|
29
29
|
# Import the agent
|
30
30
|
AGENT_ID=$(curl --silent --show-error --no-progress-meter \
|
31
31
|
--request POST \
|
@@ -2,10 +2,10 @@
|
|
2
2
|
# Script to authenticate and initialize jivas agents
|
3
3
|
|
4
4
|
# Export env vars
|
5
|
-
source sh/exportenv.sh
|
5
|
+
source ./sh/exportenv.sh
|
6
6
|
|
7
7
|
# Init the user token
|
8
|
-
source sh/inituser.sh
|
8
|
+
source ./sh/inituser.sh
|
9
9
|
|
10
10
|
# Check if JIVAS_TOKEN is set
|
11
11
|
if [ -n "$JIVAS_TOKEN" ]; then
|
@@ -7,7 +7,7 @@ if [ -z "$JIVAS_PORT" ] || [ -z "$JIVAS_PASSWORD" ] || [ -z "$JIVAS_USER" ]; the
|
|
7
7
|
exit 1
|
8
8
|
fi
|
9
9
|
|
10
|
-
if lsof -i :$JIVAS_PORT >/dev/null; then
|
10
|
+
if lsof -i :$JIVAS_PORT >/dev/null || netstat -an | grep -q ":$JIVAS_PORT .*LISTEN"; then
|
11
11
|
|
12
12
|
# Try to login first
|
13
13
|
JIVAS_TOKEN=$(curl --silent --show-error --no-progress-meter \
|
@@ -55,6 +55,7 @@ jvcli/templates/2.0.0/agent_knowledge.yaml
|
|
55
55
|
jvcli/templates/2.0.0/agent_memory.yaml
|
56
56
|
jvcli/templates/2.0.0/project/README.md
|
57
57
|
jvcli/templates/2.0.0/project/env.example
|
58
|
+
jvcli/templates/2.0.0/project/gitignore.example
|
58
59
|
jvcli/templates/2.0.0/project/globals.jac
|
59
60
|
jvcli/templates/2.0.0/project/main.jac
|
60
61
|
jvcli/templates/2.0.0/project/actions/README.md
|
@@ -17,7 +17,7 @@ class TestStartProjectCommand:
|
|
17
17
|
|
18
18
|
# Mock file system operations
|
19
19
|
mock_makedirs = mocker.patch("os.makedirs")
|
20
|
-
mocker.patch("os.path.exists",
|
20
|
+
mocker.patch("os.path.exists", side_effect=lambda path: path != "test_project")
|
21
21
|
|
22
22
|
# Mock open with support for both text and binary modes
|
23
23
|
mock_file = mocker.mock_open(read_data=b"template content")
|
@@ -45,6 +45,9 @@ class TestStartProjectCommand:
|
|
45
45
|
"main.jac",
|
46
46
|
"globals.jac",
|
47
47
|
".env",
|
48
|
+
"env.example",
|
49
|
+
".gitignore",
|
50
|
+
"gitignore.example",
|
48
51
|
"README.md",
|
49
52
|
"actions/README.md",
|
50
53
|
"daf/README.md",
|
@@ -58,10 +61,16 @@ class TestStartProjectCommand:
|
|
58
61
|
]
|
59
62
|
|
60
63
|
mock_calls = mock_open.mock_calls
|
61
|
-
written_files =
|
62
|
-
call.args[0]
|
64
|
+
written_files = {
|
65
|
+
os.path.normpath(call.args[0])
|
66
|
+
for call in mock_calls
|
67
|
+
if "test_project" in str(call)
|
68
|
+
}
|
69
|
+
normalized_expected_files = [
|
70
|
+
os.path.normpath(os.path.join("test_project", file))
|
71
|
+
for file in expected_files
|
63
72
|
]
|
64
|
-
assert
|
73
|
+
assert set(written_files) == set(normalized_expected_files)
|
65
74
|
|
66
75
|
# Verify success message
|
67
76
|
mock_click.assert_called_with(
|
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
|