jvcli 2.0.1__py3-none-any.whl → 2.0.3__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 +1 -1
- jvcli/cli.py +2 -0
- jvcli/client/__init__.py +1 -0
- jvcli/client/app.py +160 -0
- jvcli/client/lib/__init__.py +1 -0
- jvcli/client/lib/page.py +68 -0
- jvcli/client/lib/utils.py +334 -0
- jvcli/client/lib/widgets.py +252 -0
- jvcli/client/pages/__init__.py +1 -0
- jvcli/client/pages/analytics_page.py +178 -0
- jvcli/client/pages/chat_page.py +143 -0
- jvcli/client/pages/dashboard_page.py +119 -0
- jvcli/client/pages/graph_page.py +20 -0
- jvcli/commands/client.py +50 -0
- jvcli/commands/create.py +5 -5
- jvcli/commands/publish.py +12 -1
- jvcli/commands/studio.py +1 -1
- {jvcli-2.0.1.dist-info → jvcli-2.0.3.dist-info}/METADATA +5 -1
- jvcli-2.0.3.dist-info/RECORD +44 -0
- jvcli-2.0.1.dist-info/RECORD +0 -32
- /jvcli/{client → studio}/assets/index-BtFItD2q.js +0 -0
- /jvcli/{client → studio}/assets/index-CIEsu-TC.css +0 -0
- /jvcli/{client → studio}/index.html +0 -0
- /jvcli/{client → studio}/jac_logo.png +0 -0
- /jvcli/{client → studio}/tauri.svg +0 -0
- /jvcli/{client → studio}/vite.svg +0 -0
- {jvcli-2.0.1.dist-info → jvcli-2.0.3.dist-info}/LICENSE +0 -0
- {jvcli-2.0.1.dist-info → jvcli-2.0.3.dist-info}/WHEEL +0 -0
- {jvcli-2.0.1.dist-info → jvcli-2.0.3.dist-info}/entry_points.txt +0 -0
- {jvcli-2.0.1.dist-info → jvcli-2.0.3.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,20 @@
|
|
1
|
+
"""Render the Jivas Studio page in an iframe."""
|
2
|
+
|
3
|
+
import os
|
4
|
+
|
5
|
+
import streamlit as st
|
6
|
+
from streamlit_router import StreamlitRouter
|
7
|
+
|
8
|
+
JIVAS_STUDIO_URL = os.environ.get("JIVAS_STUDIO_URL", "http://localhost:8989")
|
9
|
+
|
10
|
+
|
11
|
+
def render(router: StreamlitRouter) -> None:
|
12
|
+
"""
|
13
|
+
Render the Jivas Studio page in an iframe.
|
14
|
+
|
15
|
+
args:
|
16
|
+
router: StreamlitRouter
|
17
|
+
The StreamlitRouter instance
|
18
|
+
"""
|
19
|
+
|
20
|
+
st.components.v1.iframe(JIVAS_STUDIO_URL, width=None, height=800, scrolling=False)
|
jvcli/commands/client.py
ADDED
@@ -0,0 +1,50 @@
|
|
1
|
+
"""Client command group for deploying and interfacing with the Jivas Client."""
|
2
|
+
|
3
|
+
import os
|
4
|
+
import subprocess
|
5
|
+
from pathlib import Path
|
6
|
+
|
7
|
+
import click
|
8
|
+
|
9
|
+
|
10
|
+
@click.group()
|
11
|
+
def client() -> None:
|
12
|
+
"""Group for managing Jivas Client resources."""
|
13
|
+
pass # pragma: no cover
|
14
|
+
|
15
|
+
|
16
|
+
@client.command()
|
17
|
+
@click.option("--port", default=8501, help="Port for the client to launch on.")
|
18
|
+
@click.option(
|
19
|
+
"--jivas_url",
|
20
|
+
default=os.environ.get("JIVAS_URL", "http://localhost:8000"),
|
21
|
+
help="URL for the Jivas API.",
|
22
|
+
)
|
23
|
+
@click.option(
|
24
|
+
"--studio_url",
|
25
|
+
default=os.environ.get("JIVAS_STUDIO_URL", "http://localhost:8989"),
|
26
|
+
help="URL for the Jivas Studio.",
|
27
|
+
)
|
28
|
+
def launch(port: int, jivas_url: str, studio_url: str) -> None:
|
29
|
+
"""Launch the Jivas Client."""
|
30
|
+
click.echo(
|
31
|
+
f"Launching Jivas Client on port {port}, loading action apps from {jivas_url}..."
|
32
|
+
)
|
33
|
+
os.environ["JIVAS_URL"] = jivas_url
|
34
|
+
os.environ["JIVAS_STUDIO_URL"] = studio_url
|
35
|
+
subprocess.call(
|
36
|
+
[
|
37
|
+
"streamlit",
|
38
|
+
"run",
|
39
|
+
"--server.port={}".format(port),
|
40
|
+
"--client.showSidebarNavigation=False",
|
41
|
+
"--client.showErrorDetails=False",
|
42
|
+
"--global.showWarningOnDirectExecution=False",
|
43
|
+
Path(__file__)
|
44
|
+
.resolve()
|
45
|
+
.parent.parent.joinpath("client")
|
46
|
+
.joinpath("app.py")
|
47
|
+
.resolve()
|
48
|
+
.__str__(),
|
49
|
+
]
|
50
|
+
)
|
jvcli/commands/create.py
CHANGED
@@ -4,7 +4,7 @@ import os
|
|
4
4
|
|
5
5
|
import click
|
6
6
|
|
7
|
-
from jvcli import __supported__jivas__versions__
|
7
|
+
from jvcli import __supported__jivas__versions__
|
8
8
|
from jvcli.api import RegistryAPI
|
9
9
|
from jvcli.auth import load_token, save_token
|
10
10
|
from jvcli.utils import TEMPLATES_DIR, validate_name, validate_snake_case
|
@@ -370,14 +370,14 @@ def create_agent(
|
|
370
370
|
|
371
371
|
# Load templates
|
372
372
|
template_paths = {
|
373
|
-
"info.yaml": os.path.join(TEMPLATES_DIR,
|
373
|
+
"info.yaml": os.path.join(TEMPLATES_DIR, jivas_version, "agent_info.yaml"),
|
374
374
|
"descriptor.yaml": os.path.join(
|
375
|
-
TEMPLATES_DIR,
|
375
|
+
TEMPLATES_DIR, jivas_version, "agent_descriptor.yaml"
|
376
376
|
),
|
377
377
|
"knowledge.yaml": os.path.join(
|
378
|
-
TEMPLATES_DIR,
|
378
|
+
TEMPLATES_DIR, jivas_version, "agent_knowledge.yaml"
|
379
379
|
),
|
380
|
-
"memory.yaml": os.path.join(TEMPLATES_DIR,
|
380
|
+
"memory.yaml": os.path.join(TEMPLATES_DIR, jivas_version, "agent_memory.yaml"),
|
381
381
|
}
|
382
382
|
|
383
383
|
# Check if all templates exist
|
jvcli/commands/publish.py
CHANGED
@@ -163,7 +163,18 @@ def _publish_common(
|
|
163
163
|
click.secho(f"Error validating dependencies: {e}", fg="red")
|
164
164
|
return
|
165
165
|
|
166
|
-
|
166
|
+
package_namespace, name = package_name.split("/", 1)
|
167
|
+
|
168
|
+
# verify that publish namespace matches package namespace
|
169
|
+
if (namespace and package_namespace) and (namespace != package_namespace):
|
170
|
+
click.secho(
|
171
|
+
f"Error validating namespace: You provided '{namespace}', but '{package_namespace}' was found in the package info file.",
|
172
|
+
fg="red",
|
173
|
+
)
|
174
|
+
return
|
175
|
+
|
176
|
+
# we need to ensure that the namespace is not None i.e namespace not used in cli
|
177
|
+
namespace = namespace or package_namespace
|
167
178
|
|
168
179
|
if package_only and not output:
|
169
180
|
output = "."
|
jvcli/commands/studio.py
CHANGED
@@ -90,7 +90,7 @@ def launch(port: int) -> None:
|
|
90
90
|
app.add_api_route("/graph", endpoint=get_graph, methods=["GET"])
|
91
91
|
app.add_api_route("/users", endpoint=get_users, methods=["GET"])
|
92
92
|
|
93
|
-
client_dir = Path(__file__).resolve().parent.parent.joinpath("
|
93
|
+
client_dir = Path(__file__).resolve().parent.parent.joinpath("studio")
|
94
94
|
app.mount("/", StaticFiles(directory=client_dir, html=True), name="studio")
|
95
95
|
|
96
96
|
run(app, host="0.0.0.0", port=port)
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.2
|
2
2
|
Name: jvcli
|
3
|
-
Version: 2.0.
|
3
|
+
Version: 2.0.3
|
4
4
|
Summary: CLI tool for Jivas Package Repository
|
5
5
|
Home-page: https://github.com/TrueSelph/jvcli
|
6
6
|
Author: TrueSelph Inc.
|
@@ -13,6 +13,10 @@ Requires-Dist: requests>=2.32.3
|
|
13
13
|
Requires-Dist: packaging>=24.2
|
14
14
|
Requires-Dist: pyaml>=25.1.0
|
15
15
|
Requires-Dist: jac-cloud>=0.1.19
|
16
|
+
Requires-Dist: streamlit>=1.42.0
|
17
|
+
Requires-Dist: streamlit-elements>=0.1.0
|
18
|
+
Requires-Dist: streamlit-router>=0.1.8
|
19
|
+
Requires-Dist: streamlit-javascript>=0.1.5
|
16
20
|
Provides-Extra: dev
|
17
21
|
Requires-Dist: pre-commit; extra == "dev"
|
18
22
|
Requires-Dist: pytest; extra == "dev"
|
@@ -0,0 +1,44 @@
|
|
1
|
+
jvcli/__init__.py,sha256=uCfSlD7TkXwY-clvqzOHfAv761oMurIJHUpHpt8fhmQ,170
|
2
|
+
jvcli/api.py,sha256=gs0ZWf5T6nMJc6m1aGz6qZpqDHhYhhtVsvN6UYwtpAs,11113
|
3
|
+
jvcli/auth.py,sha256=p04T02ufqbENx_93oDPg3xsq7sv-Nabeq3YR1kLXfSg,1215
|
4
|
+
jvcli/cli.py,sha256=H9vQgfzYfhtCh2Rv-Xah35DCb84Y-nhemW5tQwZNOoc,975
|
5
|
+
jvcli/utils.py,sha256=NKWjjJ45NFlwT7QVMh1YMY2zfvGaJ_8LppG4D8QXCwA,7726
|
6
|
+
jvcli/client/__init__.py,sha256=WGP05OBzZHReqENYs1qYqMnYvgAaNVW6KvGQvyB3NGs,85
|
7
|
+
jvcli/client/app.py,sha256=v494Q_uvw4gO9s4s_KlP_Zxd8g_IEG1BkefoEdppjxU,5464
|
8
|
+
jvcli/client/lib/__init__.py,sha256=_Wv8CNIxeIle_x0U9T6w9s5mPuOY9-0u69BvTEPXLUw,38
|
9
|
+
jvcli/client/lib/page.py,sha256=QF53ffO4A2P9QTdPFfi0baCpKyEMmfkLyhJNxm7pTb0,2225
|
10
|
+
jvcli/client/lib/utils.py,sha256=8YyGoU0Zch9XKz2eBKnXau6bI-dkEV--CSmPbFr8SBA,9833
|
11
|
+
jvcli/client/lib/widgets.py,sha256=-YijWUNEgR93LoWiOEDUMi2_sgD_p-dbmkuR92NA-GU,9424
|
12
|
+
jvcli/client/pages/__init__.py,sha256=sXsBV8cGItWhXtYg8PkfCd1Vi5ibd-rv5LABnPC_St4,51
|
13
|
+
jvcli/client/pages/analytics_page.py,sha256=bNlIaMgWGHz_XO4Z2a0jzEUL1ryGR_4s8TDsyTjZP10,5660
|
14
|
+
jvcli/client/pages/chat_page.py,sha256=Eye4KFt_wsiJuX5S7BqNErb2bApYDbNKc-1rJ5HZwnI,4749
|
15
|
+
jvcli/client/pages/dashboard_page.py,sha256=bzITRQI-cA5XUrIxwgiFGgrTZp3vvYeiU_e6K4tGx1Q,5006
|
16
|
+
jvcli/client/pages/graph_page.py,sha256=2ZN-C9eskqICgnZhfP1zc6YOPPsGib_WZw3xHXcA63k,491
|
17
|
+
jvcli/commands/__init__.py,sha256=bjZvM55MC2NugvRlxkEU9CDDP9NnsygcsGZewj1gQcg,57
|
18
|
+
jvcli/commands/auth.py,sha256=LjVPgSt50k95H3rlCRappYEt_PsES7FlZryh4ipjSc4,1602
|
19
|
+
jvcli/commands/client.py,sha256=SfcE7sDF8gw3pMFs28YV-Rz3cb9rm2O1Kcu-INmAy-g,1422
|
20
|
+
jvcli/commands/create.py,sha256=-9Lcng3Ef6AMZwBcuXDgvJCuvWxB_dB_fQF5-OBCkqA,13394
|
21
|
+
jvcli/commands/download.py,sha256=AT6SFiJ9ysqNMDCdKsZ6CMUx96qpyzgraOk6EuNL2Qs,3417
|
22
|
+
jvcli/commands/info.py,sha256=NyIDpR_AGMMSFPE0tFZv4dIuv_gwqrfd589zQAA_Q3s,2685
|
23
|
+
jvcli/commands/publish.py,sha256=q1ihoL42GmEsU5ggHN3bcg8QD26kjRUZGfQpRzI2GMo,6630
|
24
|
+
jvcli/commands/studio.py,sha256=4acrd5Wpv5h2TBFPrzOQGyAtMpy8bQaqPh96Js9nod8,2761
|
25
|
+
jvcli/commands/update.py,sha256=LwCLg-W1b8WSdFkiiJ8WwTit2HJXTLpM5OQ4WBTe9C4,1997
|
26
|
+
jvcli/studio/index.html,sha256=a4UaOrpXsTrHTF1iN3VIWzF7wgVWvFCEzoFRw-tDPXc,474
|
27
|
+
jvcli/studio/jac_logo.png,sha256=upImjxkFU42yMutB-w8S_ZrrWpXxNRtKWUUkmID-8mk,14015
|
28
|
+
jvcli/studio/tauri.svg,sha256=5dJzi7qlVDxGhAAaVY3FMWXam2NhRIJ7KNsdz6z4Gqg,2599
|
29
|
+
jvcli/studio/vite.svg,sha256=SnSK_UQ5GLsWWRyDTEAdrjPoeGGrXbrQgRw6O0qSFPs,1497
|
30
|
+
jvcli/studio/assets/index-BtFItD2q.js,sha256=XR7x4zSXb_BQPw3rXtqdgTYedJhL841Yb0HSLD6155I,934734
|
31
|
+
jvcli/studio/assets/index-CIEsu-TC.css,sha256=kGREUw4sJoCChaHm6s7o5mQCESn1ciVPkmdXXadW1l0,191921
|
32
|
+
jvcli/templates/CHANGELOG.md,sha256=aci-j1gPbzyywQyPY9M2PJkZLVTKgdDuJYcFpdPpKHQ,66
|
33
|
+
jvcli/templates/README.md,sha256=VcLV54kkjp_m-cVVuH_OTdIJ39T41sM2TwKH9ISyqbk,51
|
34
|
+
jvcli/templates/2.0.0/action_info.yaml,sha256=ACSLbkr8P3XY8DzPHiGXH9OfjJ2Y-lZd3WefnvPIVbQ,303
|
35
|
+
jvcli/templates/2.0.0/agent_descriptor.yaml,sha256=h6_pxmaP-oJqLDCHAyZ1ckETfWD6D60wsmGUH-FVLpI,742
|
36
|
+
jvcli/templates/2.0.0/agent_info.yaml,sha256=3olXRQDQG-543o7zSWWT23kJsK29QGhdx6-tOLXvCk8,207
|
37
|
+
jvcli/templates/2.0.0/agent_knowledge.yaml,sha256=hI0ifr0ICiZGce-oUFovBOmDWxGU1Z2M10WyZH_wS2g,284
|
38
|
+
jvcli/templates/2.0.0/agent_memory.yaml,sha256=_MBgObZcW1UzwWuYQVJiPZ_7TvYbGrDgd-xMuzJEkVo,9
|
39
|
+
jvcli-2.0.3.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
40
|
+
jvcli-2.0.3.dist-info/METADATA,sha256=C56pkq4AzCs8_wBxs_Hr8J9fe4p9dInx7bUlBmCYgwk,4113
|
41
|
+
jvcli-2.0.3.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
|
42
|
+
jvcli-2.0.3.dist-info/entry_points.txt,sha256=XunGcL0LWmIMIytaUckUA27czEf8M2Y4aTOfYIpOgrQ,42
|
43
|
+
jvcli-2.0.3.dist-info/top_level.txt,sha256=akZnN9Zy1dFT93N0ms-C8ZXUn-xlhq37nO3jSRp0Y6o,6
|
44
|
+
jvcli-2.0.3.dist-info/RECORD,,
|
jvcli-2.0.1.dist-info/RECORD
DELETED
@@ -1,32 +0,0 @@
|
|
1
|
-
jvcli/__init__.py,sha256=s8Ivv5aUXFCTT3Ob5Tfuliotdbvr6_qdXM0Bbnfil3s,170
|
2
|
-
jvcli/api.py,sha256=gs0ZWf5T6nMJc6m1aGz6qZpqDHhYhhtVsvN6UYwtpAs,11113
|
3
|
-
jvcli/auth.py,sha256=p04T02ufqbENx_93oDPg3xsq7sv-Nabeq3YR1kLXfSg,1215
|
4
|
-
jvcli/cli.py,sha256=qgfKC-oH13EUhDJxoZCSu2f2xlARGp9i0HnRw6D92ZI,908
|
5
|
-
jvcli/utils.py,sha256=NKWjjJ45NFlwT7QVMh1YMY2zfvGaJ_8LppG4D8QXCwA,7726
|
6
|
-
jvcli/client/index.html,sha256=a4UaOrpXsTrHTF1iN3VIWzF7wgVWvFCEzoFRw-tDPXc,474
|
7
|
-
jvcli/client/jac_logo.png,sha256=upImjxkFU42yMutB-w8S_ZrrWpXxNRtKWUUkmID-8mk,14015
|
8
|
-
jvcli/client/tauri.svg,sha256=5dJzi7qlVDxGhAAaVY3FMWXam2NhRIJ7KNsdz6z4Gqg,2599
|
9
|
-
jvcli/client/vite.svg,sha256=SnSK_UQ5GLsWWRyDTEAdrjPoeGGrXbrQgRw6O0qSFPs,1497
|
10
|
-
jvcli/client/assets/index-BtFItD2q.js,sha256=XR7x4zSXb_BQPw3rXtqdgTYedJhL841Yb0HSLD6155I,934734
|
11
|
-
jvcli/client/assets/index-CIEsu-TC.css,sha256=kGREUw4sJoCChaHm6s7o5mQCESn1ciVPkmdXXadW1l0,191921
|
12
|
-
jvcli/commands/__init__.py,sha256=bjZvM55MC2NugvRlxkEU9CDDP9NnsygcsGZewj1gQcg,57
|
13
|
-
jvcli/commands/auth.py,sha256=LjVPgSt50k95H3rlCRappYEt_PsES7FlZryh4ipjSc4,1602
|
14
|
-
jvcli/commands/create.py,sha256=KGdU4FpWOOyoJAPRIhEgEsGtWLtVv3nmagwvFgXMcjs,13399
|
15
|
-
jvcli/commands/download.py,sha256=AT6SFiJ9ysqNMDCdKsZ6CMUx96qpyzgraOk6EuNL2Qs,3417
|
16
|
-
jvcli/commands/info.py,sha256=NyIDpR_AGMMSFPE0tFZv4dIuv_gwqrfd589zQAA_Q3s,2685
|
17
|
-
jvcli/commands/publish.py,sha256=wpplib0R6zjy9c3nHGiSLs3zIYEaVzvOTSKXXgwQB6E,6109
|
18
|
-
jvcli/commands/studio.py,sha256=9Efyk-TwVpoBEg4MNgcEDpcLbQJCSboapiGwFmATSZc,2761
|
19
|
-
jvcli/commands/update.py,sha256=LwCLg-W1b8WSdFkiiJ8WwTit2HJXTLpM5OQ4WBTe9C4,1997
|
20
|
-
jvcli/templates/CHANGELOG.md,sha256=aci-j1gPbzyywQyPY9M2PJkZLVTKgdDuJYcFpdPpKHQ,66
|
21
|
-
jvcli/templates/README.md,sha256=VcLV54kkjp_m-cVVuH_OTdIJ39T41sM2TwKH9ISyqbk,51
|
22
|
-
jvcli/templates/2.0.0/action_info.yaml,sha256=ACSLbkr8P3XY8DzPHiGXH9OfjJ2Y-lZd3WefnvPIVbQ,303
|
23
|
-
jvcli/templates/2.0.0/agent_descriptor.yaml,sha256=h6_pxmaP-oJqLDCHAyZ1ckETfWD6D60wsmGUH-FVLpI,742
|
24
|
-
jvcli/templates/2.0.0/agent_info.yaml,sha256=3olXRQDQG-543o7zSWWT23kJsK29QGhdx6-tOLXvCk8,207
|
25
|
-
jvcli/templates/2.0.0/agent_knowledge.yaml,sha256=hI0ifr0ICiZGce-oUFovBOmDWxGU1Z2M10WyZH_wS2g,284
|
26
|
-
jvcli/templates/2.0.0/agent_memory.yaml,sha256=_MBgObZcW1UzwWuYQVJiPZ_7TvYbGrDgd-xMuzJEkVo,9
|
27
|
-
jvcli-2.0.1.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
28
|
-
jvcli-2.0.1.dist-info/METADATA,sha256=9PRVtk6zBS2AvDQzZh5k6BVsz_MNUNFQzMA1mvM0l9Q,3957
|
29
|
-
jvcli-2.0.1.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
|
30
|
-
jvcli-2.0.1.dist-info/entry_points.txt,sha256=XunGcL0LWmIMIytaUckUA27czEf8M2Y4aTOfYIpOgrQ,42
|
31
|
-
jvcli-2.0.1.dist-info/top_level.txt,sha256=akZnN9Zy1dFT93N0ms-C8ZXUn-xlhq37nO3jSRp0Y6o,6
|
32
|
-
jvcli-2.0.1.dist-info/RECORD,,
|
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
|