jvcli 2.0.10__py3-none-any.whl → 2.0.12__py3-none-any.whl

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/__init__.py CHANGED
@@ -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.10"
7
+ __version__ = "2.0.12"
8
8
  __supported__jivas__versions__ = ["2.0.0"]
@@ -15,10 +15,10 @@ sh sh/serve.sh
15
15
  To set up a demo agent, run the following command in another terminal:
16
16
 
17
17
  ```sh
18
- sh sh/importagent.sh
18
+ sh sh/importagent.sh jivas/demo_ai
19
19
  ```
20
20
 
21
- This will initialize JIVAS, download, and install a demo agent.
21
+ This will initialize JIVAS, download, and install a demo agent. If you wish to install any other agent, replace 'jivas/demo_ai' with the package name of your agent's DAF.
22
22
 
23
23
  ## Accessing the JIVAS Manager
24
24
 
@@ -2,8 +2,8 @@
2
2
 
3
3
  # Export env vars
4
4
  set -o allexport
5
- if [ -f .env ]; then
6
- source .env
5
+ if [ -f ./.env ]; then
6
+ source ./.env
7
7
  else
8
8
  echo ".env file not found"
9
9
  exit 1
@@ -1,11 +1,26 @@
1
1
  #!/bin/bash
2
2
  # Script to create jivas user, login, and initialize jivas graph
3
3
 
4
+ # Check if DAF_NAME is passed as a parameter
5
+ if [ -z "$1" ]; then
6
+ echo "Usage: $0 <DAF_NAME>"
7
+ exit 1
8
+ fi
9
+
10
+ DAF_NAME="$1"
11
+
4
12
  # Export env vars
5
- source sh/exportenv.sh
13
+ source ./sh/exportenv.sh
6
14
 
7
15
  # Init the user token
8
- source sh/inituser.sh
16
+ source ./sh/inituser.sh
17
+
18
+ # Wait until JIVAS_TOKEN is set
19
+ while [ -z "$JIVAS_TOKEN" ]; do
20
+ echo "Waiting for JIVAS_TOKEN to be initialized..."
21
+ sleep 1
22
+ source ./sh/inituser.sh
23
+ done
9
24
 
10
25
  # Check if JIVAS_TOKEN is set
11
26
  if [ -n "$JIVAS_TOKEN" ]; then
@@ -17,7 +32,7 @@ if [ -n "$JIVAS_TOKEN" ]; then
17
32
  --header 'Content-Type: application/json' \
18
33
  --header 'Accept: application/json' \
19
34
  --header "Authorization: Bearer $JIVAS_TOKEN" \
20
- --data '{"daf_name": "jivas/eldon_ai"}' \
35
+ --data "{\"daf_name\": \"$DAF_NAME\"}" \
21
36
  "http://localhost:$JIVAS_PORT/walker/import_agent" | grep -o '"id":"[^"]*' | sed 's/"id":"//')
22
37
 
23
38
  if [ -z "$AGENT_ID" ]; then
@@ -30,7 +45,3 @@ else
30
45
  echo "Failed to initialize user token. Exiting..."
31
46
  exit 1
32
47
  fi
33
-
34
-
35
-
36
-
@@ -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 \
@@ -38,7 +38,7 @@ if lsof -i :$JIVAS_PORT >/dev/null; then
38
38
  --header 'Content-Type: application/json' \
39
39
  --header 'Accept: application/json' \
40
40
  --data '{"password": "'"$JIVAS_PASSWORD"'","email": "'"$JIVAS_USER"'"}' \
41
- "http://localhost:$JIVAS_PORT/user/login" | grep -oP '(?<="token":")[^"]*')
41
+ "http://localhost:$JIVAS_PORT/user/login" | grep -o '"token":"[^"]*' | sed 's/"token":"//')
42
42
  fi
43
43
 
44
44
  # Print token
@@ -1,7 +1,7 @@
1
1
  #!/bin/bash
2
2
  # Script to serve jivas app
3
3
 
4
- source sh/exportenv.sh
4
+ source ./sh/exportenv.sh
5
5
 
6
6
  # serve jivas app
7
7
  jac jvserve main.jac
@@ -1,7 +1,7 @@
1
1
  #!/bin/bash
2
2
  # Script to serve jivas client app
3
3
 
4
- source sh/exportenv.sh
4
+ source ./sh/exportenv.sh
5
5
 
6
6
  # launch jivas client app
7
7
  jvcli client launch
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.2
1
+ Metadata-Version: 2.4
2
2
  Name: jvcli
3
- Version: 2.0.10
3
+ Version: 2.0.12
4
4
  Summary: CLI tool for Jivas Package Repository
5
5
  Home-page: https://github.com/TrueSelph/jvcli
6
6
  Author: TrueSelph Inc.
@@ -27,6 +27,7 @@ Dynamic: author-email
27
27
  Dynamic: description
28
28
  Dynamic: description-content-type
29
29
  Dynamic: home-page
30
+ Dynamic: license-file
30
31
  Dynamic: provides-extra
31
32
  Dynamic: requires-dist
32
33
  Dynamic: requires-python
@@ -1,4 +1,4 @@
1
- jvcli/__init__.py,sha256=au5GKsdfzG0naZMtQkPsR124zlXEwc09N443NJc0Ik8,171
1
+ jvcli/__init__.py,sha256=-IAJ0CzKiWPyUvcMlu_oGrkqBmXO7nkby6CEtUlPH3w,171
2
2
  jvcli/api.py,sha256=gd-EP1e75e7HijyrP-EF6i_jjCo6YUeSbm1l5daKLfQ,10352
3
3
  jvcli/auth.py,sha256=p04T02ufqbENx_93oDPg3xsq7sv-Nabeq3YR1kLXfSg,1215
4
4
  jvcli/cli.py,sha256=VM_QGPiYfSdqOZ4n0YLZbrOwXm0d5lHmzv47MqTyBMc,1060
@@ -43,22 +43,22 @@ jvcli/templates/2.0.0/agent_descriptor.yaml,sha256=h6_pxmaP-oJqLDCHAyZ1ckETfWD6D
43
43
  jvcli/templates/2.0.0/agent_info.yaml,sha256=3olXRQDQG-543o7zSWWT23kJsK29QGhdx6-tOLXvCk8,207
44
44
  jvcli/templates/2.0.0/agent_knowledge.yaml,sha256=hI0ifr0ICiZGce-oUFovBOmDWxGU1Z2M10WyZH_wS2g,284
45
45
  jvcli/templates/2.0.0/agent_memory.yaml,sha256=_MBgObZcW1UzwWuYQVJiPZ_7TvYbGrDgd-xMuzJEkVo,9
46
- jvcli/templates/2.0.0/project/README.md,sha256=HV0vVTsE9ELdfdqSpy6Xrn222u9z00rMNVsNPVTMSeA,956
46
+ jvcli/templates/2.0.0/project/README.md,sha256=cr6yHG1qEzO7xDFchEDpl8tKawVvF0tsUVTrWyxjiG4,1077
47
47
  jvcli/templates/2.0.0/project/env.example,sha256=aB3Wp-0fJV1o9WlFLjxjdA5fKMg2zBV-y8-nBm9Q-bk,396
48
48
  jvcli/templates/2.0.0/project/globals.jac,sha256=CEt7L25wEZfE6TupqpM1ilHbtJMQQWExDQ5GJlkHPts,56
49
49
  jvcli/templates/2.0.0/project/main.jac,sha256=r37jsaGq-85YvDbHP3bQvBXk0u8w0rtRTZTNxZOjTW0,48
50
50
  jvcli/templates/2.0.0/project/actions/README.md,sha256=TU1t-rOBH5WQP_HUWaEBLq5BbPv4jejtjIrwTW4hZwM,1742
51
51
  jvcli/templates/2.0.0/project/daf/README.md,sha256=M2_BLO6vFlsnUbYHPQMIrcoboe91MO9H9RR8yP9-tF8,1683
52
- jvcli/templates/2.0.0/project/sh/exportenv.sh,sha256=UXH0DkHJnVz75YvAU8tw9bqfa2atniUITd7f_3FDBfk,160
53
- jvcli/templates/2.0.0/project/sh/importagent.sh,sha256=plls5CY2TUcab7OVxZDPOIYO0vF4bn-yUIjPY1YL_GQ,886
54
- jvcli/templates/2.0.0/project/sh/initagents.sh,sha256=WmMshuxLw_dXnm23uhTZjr6Eyc9pAbktlo2R_0tXK6M,923
55
- jvcli/templates/2.0.0/project/sh/inituser.sh,sha256=TUg-NqWV3F6o-5nX0fn2L4xcVOn-vbDD-NIRFThAS1U,1828
56
- jvcli/templates/2.0.0/project/sh/serve.sh,sha256=S64Pmza1Zh5uf6bDA7aXS282AQsN3jJW4RAyfi7NCrU,103
57
- jvcli/templates/2.0.0/project/sh/startclient.sh,sha256=w_oW5DZ9NHRD4HR16lVQsvq8HPtiRNUKFuG2nUrKWlQ,117
52
+ jvcli/templates/2.0.0/project/sh/exportenv.sh,sha256=keFEu6HAROE8F9cOa5FxdIb2pryd22fED66rhaAvAuU,164
53
+ jvcli/templates/2.0.0/project/sh/importagent.sh,sha256=Xe_6seVGF52iEO_jtsvX1N3GtYBhrbYHb58k7i1VG8w,1179
54
+ jvcli/templates/2.0.0/project/sh/initagents.sh,sha256=zFYlpt9G8kvYwGlBc-hJdz2TRQoLNY5Nq2Z_Vvto-NU,927
55
+ jvcli/templates/2.0.0/project/sh/inituser.sh,sha256=BYvLfFZdL0n7AGmjmoTQQcb236f5wG68RMeVJiUyhFQ,1893
56
+ jvcli/templates/2.0.0/project/sh/serve.sh,sha256=EsXOqszYD5xa8fjAEwyYCz8mSTX-v5VfiTZeKUpOKYw,105
57
+ jvcli/templates/2.0.0/project/sh/startclient.sh,sha256=3GbJtTxycLBUJGfX2_b3cfQoAPFzhvcJpWRtS2sSsRM,119
58
58
  jvcli/templates/2.0.0/project/tests/README.md,sha256=-1ZXkxuUKa6tMw_jlF3rpCvUFq8ijW2L-nSuAkbCANo,917
59
- jvcli-2.0.10.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
60
- jvcli-2.0.10.dist-info/METADATA,sha256=nxnZ1oL_P_qvDBIoWTv5UntyIpHnIZVJRwUMMx8cv7k,4180
61
- jvcli-2.0.10.dist-info/WHEEL,sha256=52BFRY2Up02UkjOa29eZOS2VxUrpPORXg1pkohGGUS8,91
62
- jvcli-2.0.10.dist-info/entry_points.txt,sha256=XunGcL0LWmIMIytaUckUA27czEf8M2Y4aTOfYIpOgrQ,42
63
- jvcli-2.0.10.dist-info/top_level.txt,sha256=akZnN9Zy1dFT93N0ms-C8ZXUn-xlhq37nO3jSRp0Y6o,6
64
- jvcli-2.0.10.dist-info/RECORD,,
59
+ jvcli-2.0.12.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
60
+ jvcli-2.0.12.dist-info/METADATA,sha256=IJfoL6NnwDLsjd5hbruANnzh4osTGEqDXQccWKz3Ru4,4202
61
+ jvcli-2.0.12.dist-info/WHEEL,sha256=CmyFI0kx5cdEMTLiONQRbGQwjIoR1aIYB7eCAQ4KPJ0,91
62
+ jvcli-2.0.12.dist-info/entry_points.txt,sha256=XunGcL0LWmIMIytaUckUA27czEf8M2Y4aTOfYIpOgrQ,42
63
+ jvcli-2.0.12.dist-info/top_level.txt,sha256=akZnN9Zy1dFT93N0ms-C8ZXUn-xlhq37nO3jSRp0Y6o,6
64
+ jvcli-2.0.12.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (76.0.0)
2
+ Generator: setuptools (78.1.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5