pocketshell 0.3.23__tar.gz → 0.3.24__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 (30) hide show
  1. {pocketshell-0.3.23 → pocketshell-0.3.24}/PKG-INFO +4 -3
  2. {pocketshell-0.3.23 → pocketshell-0.3.24}/README.md +3 -2
  3. {pocketshell-0.3.23 → pocketshell-0.3.24}/pyproject.toml +5 -5
  4. {pocketshell-0.3.23 → pocketshell-0.3.24}/src/pocketshell/__init__.py +4 -4
  5. {pocketshell-0.3.23 → pocketshell-0.3.24}/src/pocketshell/cli.py +4 -4
  6. {pocketshell-0.3.23 → pocketshell-0.3.24}/src/pocketshell/jobs.py +3 -3
  7. {pocketshell-0.3.23 → pocketshell-0.3.24}/src/pocketshell/sessions.py +0 -26
  8. {pocketshell-0.3.23 → pocketshell-0.3.24}/uv.lock +2 -2
  9. {pocketshell-0.3.23 → pocketshell-0.3.24}/.gitignore +0 -0
  10. {pocketshell-0.3.23 → pocketshell-0.3.24}/src/pocketshell/__main__.py +0 -0
  11. {pocketshell-0.3.23 → pocketshell-0.3.24}/src/pocketshell/agent_log.py +0 -0
  12. {pocketshell-0.3.23 → pocketshell-0.3.24}/src/pocketshell/daemon.py +0 -0
  13. {pocketshell-0.3.23 → pocketshell-0.3.24}/src/pocketshell/env.py +0 -0
  14. {pocketshell-0.3.23 → pocketshell-0.3.24}/src/pocketshell/hooks.py +0 -0
  15. {pocketshell-0.3.23 → pocketshell-0.3.24}/src/pocketshell/logs.py +0 -0
  16. {pocketshell-0.3.23 → pocketshell-0.3.24}/src/pocketshell/qr_share.py +0 -0
  17. {pocketshell-0.3.23 → pocketshell-0.3.24}/src/pocketshell/repos.py +0 -0
  18. {pocketshell-0.3.23 → pocketshell-0.3.24}/src/pocketshell/usage.py +0 -0
  19. {pocketshell-0.3.23 → pocketshell-0.3.24}/tests/__init__.py +0 -0
  20. {pocketshell-0.3.23 → pocketshell-0.3.24}/tests/test_agent_log.py +0 -0
  21. {pocketshell-0.3.23 → pocketshell-0.3.24}/tests/test_cli.py +0 -0
  22. {pocketshell-0.3.23 → pocketshell-0.3.24}/tests/test_daemon.py +0 -0
  23. {pocketshell-0.3.23 → pocketshell-0.3.24}/tests/test_env.py +0 -0
  24. {pocketshell-0.3.23 → pocketshell-0.3.24}/tests/test_hooks.py +0 -0
  25. {pocketshell-0.3.23 → pocketshell-0.3.24}/tests/test_jobs.py +0 -0
  26. {pocketshell-0.3.23 → pocketshell-0.3.24}/tests/test_logs.py +0 -0
  27. {pocketshell-0.3.23 → pocketshell-0.3.24}/tests/test_qr_share.py +0 -0
  28. {pocketshell-0.3.23 → pocketshell-0.3.24}/tests/test_repos.py +0 -0
  29. {pocketshell-0.3.23 → pocketshell-0.3.24}/tests/test_sessions.py +0 -0
  30. {pocketshell-0.3.23 → pocketshell-0.3.24}/tests/test_usage.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pocketshell
3
- Version: 0.3.23
3
+ Version: 0.3.24
4
4
  Summary: Unified server-side Python utility for the PocketShell Android client.
5
5
  Project-URL: Homepage, https://github.com/alexeygrigorev/pocketshell
6
6
  Project-URL: Issues, https://github.com/alexeygrigorev/pocketshell/issues
@@ -274,8 +274,9 @@ uv sync --group dev
274
274
  uv run pytest
275
275
  ```
276
276
 
277
- The tests stub `quse.usage.collect_usage` so they run in seconds without
278
- hitting any provider API.
277
+ The tests stub `pocketshell.usage.subprocess.run` (and the `quse`/`tmuxctl`
278
+ binary resolvers) so they run in seconds without invoking any real binary or
279
+ hitting a provider API.
279
280
 
280
281
  ## Release flow
281
282
 
@@ -246,8 +246,9 @@ uv sync --group dev
246
246
  uv run pytest
247
247
  ```
248
248
 
249
- The tests stub `quse.usage.collect_usage` so they run in seconds without
250
- hitting any provider API.
249
+ The tests stub `pocketshell.usage.subprocess.run` (and the `quse`/`tmuxctl`
250
+ binary resolvers) so they run in seconds without invoking any real binary or
251
+ hitting a provider API.
251
252
 
252
253
  ## Release flow
253
254
 
@@ -8,7 +8,7 @@ name = "pocketshell"
8
8
  # scripts/check-pypi-version.sh enforces this; .github/workflows/build.yml
9
9
  # runs that check before publishing to PyPI. See
10
10
  # tools/pocketshell/README.md ("Release flow") for the bump procedure.
11
- version = "0.3.23"
11
+ version = "0.3.24"
12
12
  description = "Unified server-side Python utility for the PocketShell Android client."
13
13
  readme = "README.md"
14
14
  requires-python = ">=3.11"
@@ -27,10 +27,10 @@ classifiers = [
27
27
  "Topic :: Software Development",
28
28
  "Topic :: System :: Monitoring",
29
29
  ]
30
- # First PR delegates `pocketshell usage` to the existing `quse` CLI via
31
- # subprocess (see `pocketshell/usage.py`) so the new utility does not need
32
- # `quse` published on PyPI. Later PRs will fold the provider-detection
33
- # implementation in directly. Pin lower-bound only.
30
+ # `pocketshell usage` delegates to the existing `quse` CLI via subprocess
31
+ # (see `pocketshell/usage.py`) so this utility does not need `quse`
32
+ # published on PyPI; the provider-detection implementation may be folded
33
+ # in directly later. Pin lower-bound only.
34
34
  dependencies = [
35
35
  "click>=8.2.0",
36
36
  ]
@@ -1,9 +1,9 @@
1
1
  """Unified server-side Python utility for the PocketShell Android client.
2
2
 
3
- This package is intended to replace the separately-installed `quse` and
4
- `tmuxctl` utilities the PocketShell app currently probes for. The first PR
5
- ships the skeleton plus the `pocketshell usage` subcommand only; later PRs
6
- will add `jobs`, `agent-log`, `sessions`, `repos`, and daemon mode.
3
+ This package replaces the separately-installed `quse` and `tmuxctl`
4
+ utilities the PocketShell app used to probe for. The app now probes a
5
+ single `pocketshell` binary, which exposes the `usage`, `jobs`,
6
+ `agent-log`, `sessions`, `repos`, and daemon subcommands.
7
7
 
8
8
  See https://github.com/alexeygrigorev/pocketshell/issues/170.
9
9
  """
@@ -6,10 +6,10 @@ PRs add subgroups: `jobs` (#170 second PR), `sessions` (#218),
6
6
  `agent-log` (#217), `daemon` (#219), and `repos` (#220).
7
7
 
8
8
  Per the D22 locked principle (no backwards compatibility, hard cuts only)
9
- the eventual goal is for the PocketShell Android app to probe for this
10
- single binary instead of `quse` / `tmuxctl`. The first PR keeps the
11
- existing probes in place parallel detection, not legacy detection — so
12
- the app keeps working while we ramp up `pocketshell`'s feature parity.
9
+ the PocketShell Android app probes for this single binary instead of
10
+ `quse` / `tmuxctl`: usage runs `pocketshell usage --json` (#231) and jobs
11
+ run `pocketshell jobs ...` (a direct namespace swap from `tmuxctl jobs`).
12
+ The cutover is complete; the app no longer probes the old binaries.
13
13
  """
14
14
 
15
15
  from __future__ import annotations
@@ -645,9 +645,9 @@ def daemon_start(
645
645
  """Run the scheduler loop in the foreground.
646
646
 
647
647
  This is the canonical `ExecStart=` shape: the process stays alive
648
- until SIGTERM (matching the existing `tmuxctl-jobs.service` unit
649
- file generated by `HostBootstrapper`). The IPC daemon planned in
650
- the daemon-mode spike will eventually replace this entrypoint; that
648
+ until SIGTERM (matching the `pocketshell-jobs.service` unit file
649
+ generated by `HostBootstrapper`). The IPC daemon planned in the
650
+ daemon-mode spike will eventually replace this entrypoint; that
651
651
  refactor is explicitly out of scope here.
652
652
  """
653
653
  args: list[str] = ["jobs", "daemon"]
@@ -72,32 +72,6 @@ def _tmuxctl_missing_message() -> str:
72
72
  )
73
73
 
74
74
 
75
- def _run_tmuxctl(args: Sequence[str]) -> int:
76
- """Invoke `tmuxctl` with [args]; proxy stdout/stderr and exit code.
77
-
78
- Identical contract to `pocketshell.jobs._run_tmuxctl` /
79
- `pocketshell.usage._run_quse` so a consumer that already parses
80
- `tmuxctl` output sees a byte-identical payload when routed through
81
- `pocketshell sessions ...`.
82
- """
83
- tmuxctl_path = _resolve_tmuxctl_binary()
84
- if tmuxctl_path is None:
85
- click.echo(_tmuxctl_missing_message(), err=True)
86
- return 127
87
-
88
- completed = subprocess.run(
89
- [tmuxctl_path, *args],
90
- check=False,
91
- capture_output=True,
92
- text=True,
93
- )
94
- if completed.stdout:
95
- sys.stdout.write(completed.stdout)
96
- if completed.stderr:
97
- sys.stderr.write(completed.stderr)
98
- return completed.returncode
99
-
100
-
101
75
  def _run_tmuxctl_capture(args: Sequence[str]) -> dict[str, Any]:
102
76
  """Invoke ``tmuxctl`` and return a daemon-friendly raw envelope."""
103
77
  tmuxctl_path = _resolve_tmuxctl_binary()
@@ -3,7 +3,7 @@ revision = 3
3
3
  requires-python = ">=3.11"
4
4
 
5
5
  [options]
6
- exclude-newer = "2026-05-22T22:04:41.504843187Z"
6
+ exclude-newer = "2026-05-29T16:43:17.406243682Z"
7
7
  exclude-newer-span = "P7D"
8
8
 
9
9
  [[package]]
@@ -143,7 +143,7 @@ wheels = [
143
143
 
144
144
  [[package]]
145
145
  name = "pocketshell"
146
- version = "0.3.15"
146
+ version = "0.3.24"
147
147
  source = { editable = "." }
148
148
  dependencies = [
149
149
  { name = "click" },
File without changes