kache-ssh 0.2.0__tar.gz → 0.2.1__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.
Files changed (29) hide show
  1. {kache_ssh-0.2.0 → kache_ssh-0.2.1}/PKG-INFO +1 -1
  2. {kache_ssh-0.2.0 → kache_ssh-0.2.1}/pyproject.toml +43 -43
  3. {kache_ssh-0.2.0 → kache_ssh-0.2.1}/src/kache/__init__.py +17 -17
  4. {kache_ssh-0.2.0 → kache_ssh-0.2.1}/src/kache/cli.py +10 -2
  5. {kache_ssh-0.2.0 → kache_ssh-0.2.1}/.gitignore +0 -0
  6. {kache_ssh-0.2.0 → kache_ssh-0.2.1}/AGENTS.md +0 -0
  7. {kache_ssh-0.2.0 → kache_ssh-0.2.1}/LICENSE +0 -0
  8. {kache_ssh-0.2.0 → kache_ssh-0.2.1}/README.md +0 -0
  9. {kache_ssh-0.2.0 → kache_ssh-0.2.1}/src/kache/AGENTS.md +0 -0
  10. {kache_ssh-0.2.0 → kache_ssh-0.2.1}/src/kache/__main__.py +0 -0
  11. {kache_ssh-0.2.0 → kache_ssh-0.2.1}/src/kache/agent.py +0 -0
  12. {kache_ssh-0.2.0 → kache_ssh-0.2.1}/src/kache/client.py +0 -0
  13. {kache_ssh-0.2.0 → kache_ssh-0.2.1}/src/kache/config.py +0 -0
  14. {kache_ssh-0.2.0 → kache_ssh-0.2.1}/src/kache/evidence.py +0 -0
  15. {kache_ssh-0.2.0 → kache_ssh-0.2.1}/src/kache/files.py +0 -0
  16. {kache_ssh-0.2.0 → kache_ssh-0.2.1}/src/kache/jobs.py +0 -0
  17. {kache_ssh-0.2.0 → kache_ssh-0.2.1}/src/kache/keys.py +0 -0
  18. {kache_ssh-0.2.0 → kache_ssh-0.2.1}/src/kache/mcp.py +0 -0
  19. {kache_ssh-0.2.0 → kache_ssh-0.2.1}/src/kache/network.py +0 -0
  20. {kache_ssh-0.2.0 → kache_ssh-0.2.1}/src/kache/notify.py +0 -0
  21. {kache_ssh-0.2.0 → kache_ssh-0.2.1}/src/kache/probe.py +0 -0
  22. {kache_ssh-0.2.0 → kache_ssh-0.2.1}/src/kache/service.py +0 -0
  23. {kache_ssh-0.2.0 → kache_ssh-0.2.1}/src/kache/telemetry.py +0 -0
  24. {kache_ssh-0.2.0 → kache_ssh-0.2.1}/src/kache/tui.py +0 -0
  25. {kache_ssh-0.2.0 → kache_ssh-0.2.1}/tests/test_agent_api.py +0 -0
  26. {kache_ssh-0.2.0 → kache_ssh-0.2.1}/tests/test_e2e.py +0 -0
  27. {kache_ssh-0.2.0 → kache_ssh-0.2.1}/tests/test_service.py +0 -0
  28. {kache_ssh-0.2.0 → kache_ssh-0.2.1}/tests/test_tui.py +0 -0
  29. {kache_ssh-0.2.0 → kache_ssh-0.2.1}/tests/test_v02.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: kache-ssh
3
- Version: 0.2.0
3
+ Version: 0.2.1
4
4
  Summary: Kache: one terminal to command all your devices over SSH, with a gatekeeper agent on every device.
5
5
  Author: Simon Malm
6
6
  License-Expression: MIT
@@ -1,43 +1,43 @@
1
- [build-system]
2
- requires = ["hatchling>=1.24"]
3
- build-backend = "hatchling.build"
4
-
5
- [project]
6
- name = "kache-ssh"
7
- version = "0.2.0"
8
- description = "Kache: one terminal to command all your devices over SSH, with a gatekeeper agent on every device."
9
- readme = "README.md"
10
- requires-python = ">=3.10"
11
- license = "MIT"
12
- license-files = ["LICENSE"]
13
- authors = [{ name = "Simon Malm" }]
14
- keywords = ["ssh", "remote", "orchestration", "terminal", "tui", "fleet", "tailscale", "mcp", "ai-agents"]
15
- classifiers = [
16
- "Environment :: Console",
17
- "Operating System :: Microsoft :: Windows",
18
- "Operating System :: POSIX :: Linux",
19
- "Operating System :: MacOS",
20
- "Programming Language :: Python :: 3",
21
- "Topic :: System :: Systems Administration",
22
- ]
23
- dependencies = [
24
- "asyncssh>=2.14",
25
- "textual>=8.0",
26
- "psutil>=5.9",
27
- "platformdirs>=4.0",
28
- "segno>=1.5",
29
- ]
30
-
31
- [project.optional-dependencies]
32
- gpu = ["nvidia-ml-py>=12"]
33
- dev = ["pytest>=8", "pytest-asyncio>=0.23", "build>=1.0"]
34
-
35
- [project.scripts]
36
- kache = "kache.cli:main"
37
-
38
- [tool.hatch.build.targets.wheel]
39
- packages = ["src/kache"]
40
-
41
- [tool.pytest.ini_options]
42
- asyncio_mode = "auto"
43
- testpaths = ["tests"]
1
+ [build-system]
2
+ requires = ["hatchling>=1.24"]
3
+ build-backend = "hatchling.build"
4
+
5
+ [project]
6
+ name = "kache-ssh"
7
+ version = "0.2.1"
8
+ description = "Kache: one terminal to command all your devices over SSH, with a gatekeeper agent on every device."
9
+ readme = "README.md"
10
+ requires-python = ">=3.10"
11
+ license = "MIT"
12
+ license-files = ["LICENSE"]
13
+ authors = [{ name = "Simon Malm" }]
14
+ keywords = ["ssh", "remote", "orchestration", "terminal", "tui", "fleet", "tailscale", "mcp", "ai-agents"]
15
+ classifiers = [
16
+ "Environment :: Console",
17
+ "Operating System :: Microsoft :: Windows",
18
+ "Operating System :: POSIX :: Linux",
19
+ "Operating System :: MacOS",
20
+ "Programming Language :: Python :: 3",
21
+ "Topic :: System :: Systems Administration",
22
+ ]
23
+ dependencies = [
24
+ "asyncssh>=2.14",
25
+ "textual>=8.0",
26
+ "psutil>=5.9",
27
+ "platformdirs>=4.0",
28
+ "segno>=1.5",
29
+ ]
30
+
31
+ [project.optional-dependencies]
32
+ gpu = ["nvidia-ml-py>=12"]
33
+ dev = ["pytest>=8", "pytest-asyncio>=0.23", "build>=1.0"]
34
+
35
+ [project.scripts]
36
+ kache = "kache.cli:main"
37
+
38
+ [tool.hatch.build.targets.wheel]
39
+ packages = ["src/kache"]
40
+
41
+ [tool.pytest.ini_options]
42
+ asyncio_mode = "auto"
43
+ testpaths = ["tests"]
@@ -1,17 +1,17 @@
1
- """Kache: one terminal to command all your devices.
2
-
3
- Every device runs a gatekeeper agent (an SSH server with its own rules);
4
- the Kache terminal pairs devices, shows their health, sends orders to one
5
- device or all of them, and keeps a live feed of every order anyone sends.
6
- """
7
-
8
- __version__ = "0.2.0"
9
-
10
- # Bumped whenever devices running different Kache versions could
11
- # misunderstand each other. The gatekeeper refuses orders from other
12
- # protocol versions instead of guessing.
13
- PROTOCOL = 1
14
-
15
- # Version of the JSON shapes scripts and AI agents read (feed events, CLI
16
- # --json output, MCP tool results). Every feed event carries it as "v".
17
- SCHEMA = 1
1
+ """Kache: one terminal to command all your devices.
2
+
3
+ Every device runs a gatekeeper agent (an SSH server with its own rules);
4
+ the Kache terminal pairs devices, shows their health, sends orders to one
5
+ device or all of them, and keeps a live feed of every order anyone sends.
6
+ """
7
+
8
+ __version__ = "0.2.1"
9
+
10
+ # Bumped whenever devices running different Kache versions could
11
+ # misunderstand each other. The gatekeeper refuses orders from other
12
+ # protocol versions instead of guessing.
13
+ PROTOCOL = 1
14
+
15
+ # Version of the JSON shapes scripts and AI agents read (feed events, CLI
16
+ # --json output, MCP tool results). Every feed event carries it as "v".
17
+ SCHEMA = 1
@@ -747,8 +747,16 @@ async def _service(paths: Paths, args) -> int:
747
747
 
748
748
  async def _stop(paths: Paths, args) -> int:
749
749
  await _local_request(paths, "kache:shutdown")
750
- _out(args.json, {"v": SCHEMA, "ok": True}, "Gatekeeper stopped.")
751
- return 0
750
+ # Return only once it is really gone, so a start right after this one
751
+ # (a script, a scheduled task) does not race the old process.
752
+ for _ in range(50):
753
+ if not await gatekeeper_running(paths):
754
+ break
755
+ await asyncio.sleep(0.2)
756
+ stopped = not await gatekeeper_running(paths)
757
+ _out(args.json, {"v": SCHEMA, "ok": stopped},
758
+ "Gatekeeper stopped." if stopped else "Asked the gatekeeper to stop; it is still shutting down.")
759
+ return 0 if stopped else EXIT_ERROR
752
760
 
753
761
 
754
762
  async def _whoami(paths: Paths, args) -> int:
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
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes