synapse-sdk 1.0.0a96__py3-none-any.whl → 1.0.0b1__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.
Potentially problematic release.
This version of synapse-sdk might be problematic. Click here for more details.
- synapse_sdk/cli/__init__.py +139 -84
- synapse_sdk/cli/code_server.py +169 -0
- synapse_sdk/cli/config.py +105 -4
- synapse_sdk/cli/devtools.py +54 -34
- synapse_sdk/clients/base.py +3 -4
- synapse_sdk/devtools/server.py +24 -791
- synapse_sdk/devtools/streamlit_app/__init__.py +5 -0
- synapse_sdk/devtools/streamlit_app/app.py +128 -0
- synapse_sdk/devtools/streamlit_app/services/__init__.py +11 -0
- synapse_sdk/devtools/streamlit_app/services/job_service.py +233 -0
- synapse_sdk/devtools/streamlit_app/services/plugin_service.py +236 -0
- synapse_sdk/devtools/streamlit_app/services/serve_service.py +95 -0
- synapse_sdk/devtools/streamlit_app/ui/__init__.py +15 -0
- synapse_sdk/devtools/streamlit_app/ui/config_tab.py +76 -0
- synapse_sdk/devtools/streamlit_app/ui/deployment_tab.py +66 -0
- synapse_sdk/devtools/streamlit_app/ui/http_tab.py +125 -0
- synapse_sdk/devtools/streamlit_app/ui/jobs_tab.py +573 -0
- synapse_sdk/devtools/streamlit_app/ui/serve_tab.py +346 -0
- synapse_sdk/devtools/streamlit_app/ui/status_bar.py +118 -0
- synapse_sdk/devtools/streamlit_app/utils/__init__.py +40 -0
- synapse_sdk/devtools/streamlit_app/utils/json_viewer.py +197 -0
- synapse_sdk/devtools/streamlit_app/utils/log_formatter.py +38 -0
- synapse_sdk/devtools/streamlit_app/utils/styles.py +241 -0
- synapse_sdk/devtools/streamlit_app/utils/ui_components.py +289 -0
- synapse_sdk/devtools/streamlit_app.py +10 -0
- synapse_sdk/plugins/categories/upload/actions/upload.py +2 -1
- synapse_sdk/utils/converters/dm/__init__.py +0 -1
- synapse_sdk/utils/converters/pascal/from_dm.py +32 -10
- synapse_sdk/utils/storage/providers/file_system.py +15 -13
- {synapse_sdk-1.0.0a96.dist-info → synapse_sdk-1.0.0b1.dist-info}/METADATA +4 -6
- {synapse_sdk-1.0.0a96.dist-info → synapse_sdk-1.0.0b1.dist-info}/RECORD +35 -46
- synapse_sdk/devtools/models.py +0 -55
- synapse_sdk/devtools/utils.py +0 -52
- synapse_sdk/devtools/web/.gitignore +0 -2
- synapse_sdk/devtools/web/README.md +0 -34
- synapse_sdk/devtools/web/dist/index.html +0 -17
- synapse_sdk/devtools/web/index.html +0 -16
- synapse_sdk/devtools/web/jsconfig.json +0 -15
- synapse_sdk/devtools/web/package-lock.json +0 -2609
- synapse_sdk/devtools/web/package.json +0 -27
- synapse_sdk/devtools/web/pnpm-lock.yaml +0 -1055
- synapse_sdk/devtools/web/src/App.jsx +0 -14
- synapse_sdk/devtools/web/src/App.module.css +0 -33
- synapse_sdk/devtools/web/src/assets/favicon.ico +0 -0
- synapse_sdk/devtools/web/src/components/Breadcrumbs.jsx +0 -42
- synapse_sdk/devtools/web/src/components/Layout.jsx +0 -12
- synapse_sdk/devtools/web/src/components/LogViewer.jsx +0 -280
- synapse_sdk/devtools/web/src/components/MessageViewer.jsx +0 -150
- synapse_sdk/devtools/web/src/components/NavigationSidebar.jsx +0 -128
- synapse_sdk/devtools/web/src/components/ServerStatusBar.jsx +0 -245
- synapse_sdk/devtools/web/src/components/icons.jsx +0 -325
- synapse_sdk/devtools/web/src/index.css +0 -470
- synapse_sdk/devtools/web/src/index.jsx +0 -15
- synapse_sdk/devtools/web/src/logo.svg +0 -1
- synapse_sdk/devtools/web/src/router.jsx +0 -34
- synapse_sdk/devtools/web/src/utils/api.js +0 -442
- synapse_sdk/devtools/web/src/views/ApplicationDetailView.jsx +0 -241
- synapse_sdk/devtools/web/src/views/ApplicationsView.jsx +0 -224
- synapse_sdk/devtools/web/src/views/HomeView.jsx +0 -197
- synapse_sdk/devtools/web/src/views/JobDetailView.jsx +0 -310
- synapse_sdk/devtools/web/src/views/PluginView.jsx +0 -914
- synapse_sdk/devtools/web/vite.config.js +0 -13
- {synapse_sdk-1.0.0a96.dist-info → synapse_sdk-1.0.0b1.dist-info}/WHEEL +0 -0
- {synapse_sdk-1.0.0a96.dist-info → synapse_sdk-1.0.0b1.dist-info}/entry_points.txt +0 -0
- {synapse_sdk-1.0.0a96.dist-info → synapse_sdk-1.0.0b1.dist-info}/licenses/LICENSE +0 -0
- {synapse_sdk-1.0.0a96.dist-info → synapse_sdk-1.0.0b1.dist-info}/top_level.txt +0 -0
synapse_sdk/devtools/models.py
DELETED
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
from typing import Any, Dict, List, Optional
|
|
2
|
-
|
|
3
|
-
from pydantic import BaseModel
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
class AgentStatus(BaseModel):
|
|
7
|
-
id: str
|
|
8
|
-
name: str
|
|
9
|
-
status: str # "running", "idle", "error", "stopped"
|
|
10
|
-
last_seen: str
|
|
11
|
-
resources: Dict[str, Any] = {}
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
class LogEntry(BaseModel):
|
|
15
|
-
timestamp: str
|
|
16
|
-
level: str # "INFO", "WARNING", "ERROR", "DEBUG"
|
|
17
|
-
message: str
|
|
18
|
-
source: str
|
|
19
|
-
metadata: Dict[str, Any] = {}
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
class DashboardStats(BaseModel):
|
|
23
|
-
ray_cluster: Dict[str, Any] = {}
|
|
24
|
-
backend: Dict[str, Any] = {}
|
|
25
|
-
connected_users: int = 0
|
|
26
|
-
active_jobs: int = 0
|
|
27
|
-
total_plugins: int = 0
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
class PluginInfo(BaseModel):
|
|
31
|
-
name: str
|
|
32
|
-
version: str
|
|
33
|
-
category: str
|
|
34
|
-
status: str
|
|
35
|
-
last_run: Optional[str] = None
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
class JobInfo(BaseModel):
|
|
39
|
-
id: str
|
|
40
|
-
plugin_name: str
|
|
41
|
-
status: str
|
|
42
|
-
started_at: str
|
|
43
|
-
completed_at: Optional[str] = None
|
|
44
|
-
progress: float = 0.0
|
|
45
|
-
logs: List[LogEntry] = []
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
class ConfigResponse(BaseModel):
|
|
49
|
-
config: Dict[str, Any]
|
|
50
|
-
file_path: str
|
|
51
|
-
last_modified: Optional[str] = None
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
class ConfigUpdateRequest(BaseModel):
|
|
55
|
-
config: Dict[str, Any]
|
synapse_sdk/devtools/utils.py
DELETED
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
import socket
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
def is_port_available(host: str, port: int) -> bool:
|
|
5
|
-
"""Check if a port is available on the given host"""
|
|
6
|
-
try:
|
|
7
|
-
with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as sock:
|
|
8
|
-
sock.settimeout(1)
|
|
9
|
-
result = sock.connect_ex((host, port))
|
|
10
|
-
return result != 0
|
|
11
|
-
except (socket.error, OSError):
|
|
12
|
-
return False
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
def find_available_port(host: str, start_port: int, max_attempts: int = 10) -> int:
|
|
16
|
-
"""Find an available port starting from start_port"""
|
|
17
|
-
for port in range(start_port, start_port + max_attempts):
|
|
18
|
-
if is_port_available(host, port):
|
|
19
|
-
return port
|
|
20
|
-
raise RuntimeError(f'No available port found in range {start_port}-{start_port + max_attempts - 1}')
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
def get_local_ip() -> str:
|
|
24
|
-
"""Get the local IP address for client access"""
|
|
25
|
-
try:
|
|
26
|
-
# In WSL, return localhost since the server is accessible via localhost
|
|
27
|
-
if _is_wsl():
|
|
28
|
-
return '127.0.0.1'
|
|
29
|
-
|
|
30
|
-
with socket.socket(socket.AF_INET, socket.SOCK_DGRAM) as s:
|
|
31
|
-
s.connect(('8.8.8.8', 80))
|
|
32
|
-
return s.getsockname()[0]
|
|
33
|
-
except Exception:
|
|
34
|
-
# Fallback to localhost if we can't determine the local IP
|
|
35
|
-
return '127.0.0.1'
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
def _is_wsl() -> bool:
|
|
39
|
-
"""Check if we're running in WSL"""
|
|
40
|
-
try:
|
|
41
|
-
with open('/proc/version', 'r') as f:
|
|
42
|
-
content = f.read().lower()
|
|
43
|
-
return 'microsoft' in content or 'wsl' in content
|
|
44
|
-
except Exception:
|
|
45
|
-
return False
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
def get_display_host(server_host: str) -> str:
|
|
49
|
-
"""Get the appropriate host for display and frontend access"""
|
|
50
|
-
if server_host == '0.0.0.0':
|
|
51
|
-
return get_local_ip()
|
|
52
|
-
return server_host
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
## Usage
|
|
2
|
-
|
|
3
|
-
Those templates dependencies are maintained via [pnpm](https://pnpm.io) via `pnpm up -Lri`.
|
|
4
|
-
|
|
5
|
-
This is the reason you see a `pnpm-lock.yaml`. That being said, any package manager will work. This file can be safely be removed once you clone a template.
|
|
6
|
-
|
|
7
|
-
```bash
|
|
8
|
-
$ npm install # or pnpm install or yarn install
|
|
9
|
-
```
|
|
10
|
-
|
|
11
|
-
### Learn more on the [Solid Website](https://solidjs.com) and come chat with us on our [Discord](https://discord.com/invite/solidjs)
|
|
12
|
-
|
|
13
|
-
## Available Scripts
|
|
14
|
-
|
|
15
|
-
In the project directory, you can run:
|
|
16
|
-
|
|
17
|
-
### `npm run dev` or `npm start`
|
|
18
|
-
|
|
19
|
-
Runs the app in the development mode.<br>
|
|
20
|
-
Open [http://localhost:3000](http://localhost:3000) to view it in the browser.
|
|
21
|
-
|
|
22
|
-
The page will reload if you make edits.<br>
|
|
23
|
-
|
|
24
|
-
### `npm run build`
|
|
25
|
-
|
|
26
|
-
Builds the app for production to the `dist` folder.<br>
|
|
27
|
-
It correctly bundles Solid in production mode and optimizes the build for the best performance.
|
|
28
|
-
|
|
29
|
-
The build is minified and the filenames include the hashes.<br>
|
|
30
|
-
Your app is ready to be deployed!
|
|
31
|
-
|
|
32
|
-
## Deployment
|
|
33
|
-
|
|
34
|
-
You can deploy the `dist` folder to any static host provider (netlify, surge, now, etc.)
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
<!DOCTYPE html>
|
|
2
|
-
<html lang="en">
|
|
3
|
-
<head>
|
|
4
|
-
<meta charset="utf-8" />
|
|
5
|
-
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
6
|
-
<meta name="theme-color" content="#000000" />
|
|
7
|
-
<link rel="shortcut icon" type="image/ico" href="/assets/favicon-mtvwWgEY.ico" />
|
|
8
|
-
<title>Synapse SDK</title>
|
|
9
|
-
<script type="module" crossorigin src="/assets/index-C-6muTAU.js"></script>
|
|
10
|
-
<link rel="stylesheet" crossorigin href="/assets/index-DaWyc9aY.css">
|
|
11
|
-
</head>
|
|
12
|
-
<body>
|
|
13
|
-
<noscript>You need to enable JavaScript to run this app.</noscript>
|
|
14
|
-
<div id="root"></div>
|
|
15
|
-
|
|
16
|
-
</body>
|
|
17
|
-
</html>
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
<!DOCTYPE html>
|
|
2
|
-
<html lang="en">
|
|
3
|
-
<head>
|
|
4
|
-
<meta charset="utf-8" />
|
|
5
|
-
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
6
|
-
<meta name="theme-color" content="#000000" />
|
|
7
|
-
<link rel="shortcut icon" type="image/ico" href="/src/assets/favicon.ico" />
|
|
8
|
-
<title>Synapse SDK</title>
|
|
9
|
-
</head>
|
|
10
|
-
<body>
|
|
11
|
-
<noscript>You need to enable JavaScript to run this app.</noscript>
|
|
12
|
-
<div id="root"></div>
|
|
13
|
-
|
|
14
|
-
<script src="/src/index.jsx" type="module"></script>
|
|
15
|
-
</body>
|
|
16
|
-
</html>
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"compilerOptions": {
|
|
3
|
-
"strict": true,
|
|
4
|
-
"target": "ESNext",
|
|
5
|
-
"module": "ESNext",
|
|
6
|
-
"moduleResolution": "node",
|
|
7
|
-
"allowSyntheticDefaultImports": true,
|
|
8
|
-
"esModuleInterop": true,
|
|
9
|
-
"jsx": "preserve",
|
|
10
|
-
"jsxImportSource": "solid-js",
|
|
11
|
-
"types": ["vite/client"],
|
|
12
|
-
"noEmit": true,
|
|
13
|
-
"isolatedModules": true
|
|
14
|
-
}
|
|
15
|
-
}
|