swiftgate-cli 1.0.3__tar.gz → 1.0.4__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.
- {swiftgate_cli-1.0.3 → swiftgate_cli-1.0.4}/PKG-INFO +1 -1
- {swiftgate_cli-1.0.3 → swiftgate_cli-1.0.4}/pyproject.toml +1 -1
- {swiftgate_cli-1.0.3 → swiftgate_cli-1.0.4}/src/swiftgate_cli/agent_bridge.py +1 -1
- {swiftgate_cli-1.0.3 → swiftgate_cli-1.0.4}/src/swiftgate_cli/config.py +6 -0
- {swiftgate_cli-1.0.3 → swiftgate_cli-1.0.4}/src/swiftgate_cli/main.py +5 -1
- {swiftgate_cli-1.0.3 → swiftgate_cli-1.0.4}/.gitignore +0 -0
- {swiftgate_cli-1.0.3 → swiftgate_cli-1.0.4}/LICENSE +0 -0
- {swiftgate_cli-1.0.3 → swiftgate_cli-1.0.4}/README.md +0 -0
- {swiftgate_cli-1.0.3 → swiftgate_cli-1.0.4}/src/swiftgate_cli/__init__.py +0 -0
- {swiftgate_cli-1.0.3 → swiftgate_cli-1.0.4}/src/swiftgate_cli/__main__.py +0 -0
- {swiftgate_cli-1.0.3 → swiftgate_cli-1.0.4}/src/swiftgate_cli/api_client.py +0 -0
- {swiftgate_cli-1.0.3 → swiftgate_cli-1.0.4}/src/swiftgate_cli/sse_listener.py +0 -0
- {swiftgate_cli-1.0.3 → swiftgate_cli-1.0.4}/tests/test_agent_bridge.py +0 -0
- {swiftgate_cli-1.0.3 → swiftgate_cli-1.0.4}/tests/test_config.py +0 -0
- {swiftgate_cli-1.0.3 → swiftgate_cli-1.0.4}/tests/test_sse_listener.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: swiftgate-cli
|
|
3
|
-
Version: 1.0.
|
|
3
|
+
Version: 1.0.4
|
|
4
4
|
Summary: SwiftGate CLI — autonomous bidirectional agent bridge for SwiftGate OS
|
|
5
5
|
Project-URL: Homepage, https://swiftgate.ai
|
|
6
6
|
Project-URL: Repository, https://github.com/thetaroot/swiftgate
|
|
@@ -146,7 +146,7 @@ class AgentBridge:
|
|
|
146
146
|
if not self._running or self._master_fd is None:
|
|
147
147
|
return
|
|
148
148
|
|
|
149
|
-
msg = f"\
|
|
149
|
+
msg = f"\nSwiftGate: You have {count} pending tasks. Call swiftgate_agent_get_task\n"
|
|
150
150
|
try:
|
|
151
151
|
os.write(self._master_fd, msg.encode("utf-8"))
|
|
152
152
|
logger.debug("Wake injected for %s (%d pending)", self._slug, count)
|
|
@@ -33,6 +33,12 @@ def _ensure_config_dir() -> None:
|
|
|
33
33
|
pass
|
|
34
34
|
|
|
35
35
|
|
|
36
|
+
def ensure_config_dir() -> Path:
|
|
37
|
+
"""Ensure ~/.swiftgate/ exists and return its path."""
|
|
38
|
+
_ensure_config_dir()
|
|
39
|
+
return _CONFIG_DIR
|
|
40
|
+
|
|
41
|
+
|
|
36
42
|
def _set_permissions(path: Path) -> None:
|
|
37
43
|
"""Set file permissions to 0600 (owner read/write only)."""
|
|
38
44
|
try:
|
|
@@ -18,6 +18,7 @@ from typing import Optional
|
|
|
18
18
|
import click
|
|
19
19
|
|
|
20
20
|
from swiftgate_cli.config import (
|
|
21
|
+
ensure_config_dir,
|
|
21
22
|
is_setup, set_setup, get_server, list_agents as cfg_list_agents,
|
|
22
23
|
add_agent as cfg_add_agent, remove_agent as cfg_remove_agent,
|
|
23
24
|
get_agent as cfg_get_agent,
|
|
@@ -26,16 +27,19 @@ from swiftgate_cli.api_client import APIClient
|
|
|
26
27
|
from swiftgate_cli.sse_listener import SSEWakeListener
|
|
27
28
|
from swiftgate_cli.agent_bridge import AgentBridge
|
|
28
29
|
|
|
30
|
+
_log_dir = ensure_config_dir()
|
|
29
31
|
logging.basicConfig(
|
|
30
32
|
level=logging.INFO,
|
|
31
33
|
format="%(asctime)s [%(name)s] %(levelname)s: %(message)s",
|
|
32
34
|
datefmt="%H:%M:%S",
|
|
35
|
+
filename=str(_log_dir / "swiftgate-cli.log"),
|
|
36
|
+
filemode="a",
|
|
33
37
|
)
|
|
34
38
|
logger = logging.getLogger("swiftgate")
|
|
35
39
|
|
|
36
40
|
|
|
37
41
|
@click.group()
|
|
38
|
-
@click.version_option(version="1.0.
|
|
42
|
+
@click.version_option(version="1.0.4", prog_name="swiftgate-cli")
|
|
39
43
|
def cli():
|
|
40
44
|
"""swiftgate-cli — Autonomous bidirectional agent bridge for SwiftGate OS.
|
|
41
45
|
|
|
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
|