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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: swiftgate-cli
3
- Version: 1.0.3
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
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "swiftgate-cli"
7
- version = "1.0.3"
7
+ version = "1.0.4"
8
8
  description = "SwiftGate CLI — autonomous bidirectional agent bridge for SwiftGate OS"
9
9
  readme = "README.md"
10
10
  license = { text = "MIT" }
@@ -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"\n# SwiftGate: {count} pending tasks. Run swiftgate_agent_get_task\n"
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.3", prog_name="swiftgate-cli")
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