pocketshell 0.5.8__tar.gz → 0.5.9__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 (444) hide show
  1. pocketshell-0.5.9/.gitattributes +2 -0
  2. pocketshell-0.5.8/README.md → pocketshell-0.5.9/PKG-INFO +62 -0
  3. pocketshell-0.5.8/PKG-INFO → pocketshell-0.5.9/README.md +25 -31
  4. pocketshell-0.5.9/docs/account.md +193 -0
  5. pocketshell-0.5.9/docs/architecture.md +167 -0
  6. pocketshell-0.5.9/docs/gateway-distribution.md +135 -0
  7. pocketshell-0.5.9/docs/gateway.md +816 -0
  8. pocketshell-0.5.9/docs/keys.md +221 -0
  9. pocketshell-0.5.9/docs/link-transport.md +219 -0
  10. pocketshell-0.5.9/docs/tray.md +105 -0
  11. pocketshell-0.5.9/docs/windows-gateway-client.md +238 -0
  12. pocketshell-0.5.9/docs/windows-gateway-private-runtime.md +75 -0
  13. pocketshell-0.5.9/docs/windows-tray-installer.md +161 -0
  14. pocketshell-0.5.9/native/launcher/go.mod +3 -0
  15. pocketshell-0.5.9/native/launcher/main.go +56 -0
  16. pocketshell-0.5.9/native/verify/context.go +177 -0
  17. pocketshell-0.5.9/native/verify/context_test.go +145 -0
  18. pocketshell-0.5.9/native/verify/context_windows.go +121 -0
  19. pocketshell-0.5.9/native/verify/entry.go +284 -0
  20. pocketshell-0.5.9/native/verify/go.mod +5 -0
  21. pocketshell-0.5.9/native/verify/go.sum +2 -0
  22. pocketshell-0.5.9/native/verify/main.go +193 -0
  23. pocketshell-0.5.9/native/verify/protocol.go +588 -0
  24. pocketshell-0.5.9/native/verify/protocol_test.go +349 -0
  25. pocketshell-0.5.9/native/verify/spawn_test.go +349 -0
  26. pocketshell-0.5.9/native/verify/spawn_windows.go +251 -0
  27. pocketshell-0.5.9/native/verify/verify_other.go +26 -0
  28. pocketshell-0.5.9/native/verify/verify_windows.go +568 -0
  29. pocketshell-0.5.9/pocketshell-tray.spec +61 -0
  30. {pocketshell-0.5.8 → pocketshell-0.5.9}/pyproject.toml +78 -27
  31. pocketshell-0.5.9/release/inputs/aplexer-fc396/README.md +9 -0
  32. pocketshell-0.5.9/release/inputs/aplexer-fc396/SHA256SUMS +1 -0
  33. pocketshell-0.5.9/release/inputs/aplexer-fc396/windows-native-fc396.zip +0 -0
  34. pocketshell-0.5.9/release/inputs/dossiers/OWNED-BUILD-V26A.json +848 -0
  35. pocketshell-0.5.9/release/inputs/dossiers/SHA256SUMS +5 -0
  36. pocketshell-0.5.9/release/inputs/dossiers/quiet-build-terminal-fields-addendum.json +182 -0
  37. pocketshell-0.5.9/release/inputs/dossiers/quiet-host-source-build-role-handoff.json +475 -0
  38. pocketshell-0.5.9/release/inputs/dossiers/transfer-manifest.json +52 -0
  39. pocketshell-0.5.9/release/inputs/dossiers/windows-aplexer-msys-backend-source-role-handoff.json +915 -0
  40. pocketshell-0.5.9/release/inputs/guardian-6cf7ae85/.gitattributes +1 -0
  41. pocketshell-0.5.9/release/inputs/guardian-6cf7ae85/README.md +13 -0
  42. pocketshell-0.5.9/release/inputs/guardian-6cf7ae85/SHA256SUMS +3 -0
  43. pocketshell-0.5.9/release/inputs/guardian-6cf7ae85/guardian.py +327 -0
  44. pocketshell-0.5.9/release/inputs/guardian-6cf7ae85/native_api.py +94 -0
  45. pocketshell-0.5.9/release/inputs/guardian-6cf7ae85/policy.py +95 -0
  46. pocketshell-0.5.9/release/inputs/guardian-e862645d/DERIVATION.diff +4 -0
  47. pocketshell-0.5.9/release/inputs/guardian-e862645d/README.md +22 -0
  48. pocketshell-0.5.9/release/inputs/guardian-e862645d/SHA256SUMS +3 -0
  49. pocketshell-0.5.9/release/inputs/guardian-e862645d/guardian.py +327 -0
  50. pocketshell-0.5.9/release/inputs/guardian-e862645d/native_api.py +94 -0
  51. pocketshell-0.5.9/release/inputs/guardian-e862645d/policy.py +95 -0
  52. pocketshell-0.5.9/release/inputs/guardian-servicing/README.md +8 -0
  53. pocketshell-0.5.9/release/inputs/guardian-servicing/SHA256SUMS +3 -0
  54. pocketshell-0.5.9/release/inputs/guardian-servicing/guardian.py +332 -0
  55. pocketshell-0.5.9/release/inputs/guardian-servicing/native_api.py +94 -0
  56. pocketshell-0.5.9/release/inputs/guardian-servicing/policy.py +95 -0
  57. pocketshell-0.5.9/release/inputs/msys2-runtime-5a1665c8/SHA256SUMS +1 -0
  58. pocketshell-0.5.9/release/inputs/msys2-runtime-5a1665c8/console.cc +5055 -0
  59. pocketshell-0.5.9/release/inputs/openssh-quiet-e302fe1/NULL-PATH-FIX.md +21 -0
  60. pocketshell-0.5.9/release/inputs/openssh-quiet-e302fe1/SHA256SUMS +6 -0
  61. pocketshell-0.5.9/release/inputs/openssh-quiet-e302fe1/policy-manifest.json +66 -0
  62. pocketshell-0.5.9/release/inputs/openssh-quiet-e302fe1/shell-host.c +1510 -0
  63. pocketshell-0.5.9/release/inputs/openssh-quiet-e302fe1/w32fd.c +1451 -0
  64. pocketshell-0.5.9/release/inputs/openssh-quiet-e302fe1/wmain_sshd-auth.c +115 -0
  65. pocketshell-0.5.9/release/inputs/openssh-quiet-e302fe1/wmain_sshd-session.c +115 -0
  66. pocketshell-0.5.9/release/inputs/openssh-quiet-e302fe1/wmain_sshd.c +285 -0
  67. pocketshell-0.5.9/scripts/check-antigravity-contract.py +84 -0
  68. pocketshell-0.5.9/scripts/reinstall-box-cli.sh +67 -0
  69. pocketshell-0.5.9/scripts/release/build_backend_windows.py +344 -0
  70. pocketshell-0.5.9/scripts/release/build_closure.py +505 -0
  71. pocketshell-0.5.9/scripts/release/build_tray_installer.py +383 -0
  72. pocketshell-0.5.9/scripts/release/private_shell_overlay.py +126 -0
  73. pocketshell-0.5.9/scripts/release/smoke_tray_bundle.py +106 -0
  74. pocketshell-0.5.9/scripts/release/tray-installer.nsi +98 -0
  75. {pocketshell-0.5.8 → pocketshell-0.5.9}/scripts/test-usage-missing-window-mutation.sh +3 -3
  76. pocketshell-0.5.9/scripts/windows-e2e-sshd-setup.ps1 +75 -0
  77. pocketshell-0.5.9/scripts/windows-gateway-qualify.py +542 -0
  78. pocketshell-0.5.9/src/pocketshell/account/__init__.py +69 -0
  79. pocketshell-0.5.9/src/pocketshell/account/broker.py +353 -0
  80. pocketshell-0.5.9/src/pocketshell/account/cli.py +245 -0
  81. pocketshell-0.5.9/src/pocketshell/account/config.py +177 -0
  82. pocketshell-0.5.9/src/pocketshell/account/credentials.py +326 -0
  83. pocketshell-0.5.9/src/pocketshell/account/device.py +174 -0
  84. pocketshell-0.5.9/src/pocketshell/account/errors.py +73 -0
  85. pocketshell-0.5.9/src/pocketshell/account/jsonutil.py +59 -0
  86. pocketshell-0.5.9/src/pocketshell/account/sanitize.py +59 -0
  87. pocketshell-0.5.9/src/pocketshell/agents/__init__.py +114 -0
  88. pocketshell-0.5.9/src/pocketshell/agents/conversations/__init__.py +69 -0
  89. pocketshell-0.5.9/src/pocketshell/agents/conversations/cli.py +321 -0
  90. pocketshell-0.5.9/src/pocketshell/agents/conversations/handoff.py +135 -0
  91. pocketshell-0.5.9/src/pocketshell/agents/conversations/messages.py +220 -0
  92. pocketshell-0.5.9/src/pocketshell/agents/conversations/readers.py +67 -0
  93. pocketshell-0.5.9/src/pocketshell/agents/conversations/resolve.py +133 -0
  94. pocketshell-0.5.9/src/pocketshell/agents/conversations/roots.py +92 -0
  95. pocketshell-0.5.8/src/pocketshell/agents_kind.py → pocketshell-0.5.9/src/pocketshell/agents/kind.py +7 -7
  96. pocketshell-0.5.9/src/pocketshell/agents/launch/__init__.py +23 -0
  97. pocketshell-0.5.9/src/pocketshell/agents/launch/cli.py +128 -0
  98. pocketshell-0.5.9/src/pocketshell/agents/launch/command.py +52 -0
  99. pocketshell-0.5.9/src/pocketshell/agents/launch/environment.py +206 -0
  100. pocketshell-0.5.9/src/pocketshell/agents/launch/run.py +198 -0
  101. pocketshell-0.5.9/src/pocketshell/agents/launch/spec.py +43 -0
  102. pocketshell-0.5.9/src/pocketshell/agents/launch/trust.py +63 -0
  103. pocketshell-0.5.9/src/pocketshell/attachments/__init__.py +74 -0
  104. pocketshell-0.5.9/src/pocketshell/attachments/cli.py +152 -0
  105. pocketshell-0.5.9/src/pocketshell/attachments/prune.py +250 -0
  106. pocketshell-0.5.9/src/pocketshell/cards/__init__.py +113 -0
  107. pocketshell-0.5.9/src/pocketshell/cards/cli.py +267 -0
  108. pocketshell-0.5.9/src/pocketshell/cards/paths.py +76 -0
  109. pocketshell-0.5.8/src/pocketshell/agent_card_push.py → pocketshell-0.5.9/src/pocketshell/cards/push.py +65 -45
  110. pocketshell-0.5.9/src/pocketshell/cards/store.py +313 -0
  111. pocketshell-0.5.9/src/pocketshell/cards/types/__init__.py +20 -0
  112. pocketshell-0.5.9/src/pocketshell/cards/types/checklist.py +103 -0
  113. pocketshell-0.5.9/src/pocketshell/cards/types/note.py +51 -0
  114. pocketshell-0.5.9/src/pocketshell/cards/types/registry.py +37 -0
  115. {pocketshell-0.5.8 → pocketshell-0.5.9}/src/pocketshell/cli.py +141 -58
  116. pocketshell-0.5.9/src/pocketshell/daemon/__init__.py +141 -0
  117. pocketshell-0.5.9/src/pocketshell/daemon/cache.py +117 -0
  118. pocketshell-0.5.9/src/pocketshell/daemon/client.py +305 -0
  119. pocketshell-0.5.9/src/pocketshell/daemon/dispatch.py +342 -0
  120. pocketshell-0.5.9/src/pocketshell/daemon/failures.py +235 -0
  121. pocketshell-0.5.9/src/pocketshell/daemon/lifecycle.py +211 -0
  122. pocketshell-0.5.9/src/pocketshell/daemon/methods.py +270 -0
  123. pocketshell-0.5.9/src/pocketshell/daemon/paths.py +73 -0
  124. pocketshell-0.5.9/src/pocketshell/daemon/protocol.py +91 -0
  125. pocketshell-0.5.9/src/pocketshell/daemon/server.py +253 -0
  126. pocketshell-0.5.9/src/pocketshell/engines/__init__.py +68 -0
  127. pocketshell-0.5.9/src/pocketshell/engines/builtin.py +114 -0
  128. pocketshell-0.5.9/src/pocketshell/engines/cli.py +41 -0
  129. pocketshell-0.5.9/src/pocketshell/engines/harness.py +217 -0
  130. pocketshell-0.5.9/src/pocketshell/engines/registry.py +396 -0
  131. pocketshell-0.5.9/src/pocketshell/engines/spec.py +244 -0
  132. pocketshell-0.5.9/src/pocketshell/env/__init__.py +86 -0
  133. pocketshell-0.5.9/src/pocketshell/env/cli.py +223 -0
  134. pocketshell-0.5.9/src/pocketshell/env/parse.py +168 -0
  135. pocketshell-0.5.9/src/pocketshell/env/store.py +266 -0
  136. pocketshell-0.5.9/src/pocketshell/gateway/__init__.py +12 -0
  137. pocketshell-0.5.9/src/pocketshell/gateway/cli.py +830 -0
  138. pocketshell-0.5.9/src/pocketshell/gateway/client_cli.py +383 -0
  139. pocketshell-0.5.9/src/pocketshell/gateway/devices.py +215 -0
  140. pocketshell-0.5.9/src/pocketshell/gateway/endpoint.py +259 -0
  141. pocketshell-0.5.9/src/pocketshell/gateway/helper.py +834 -0
  142. pocketshell-0.5.9/src/pocketshell/gateway/pins.py +494 -0
  143. pocketshell-0.5.9/src/pocketshell/gateway/private_endpoint.py +141 -0
  144. pocketshell-0.5.9/src/pocketshell/gateway/proxy.py +434 -0
  145. pocketshell-0.5.9/src/pocketshell/gateway/service.py +334 -0
  146. pocketshell-0.5.9/src/pocketshell/gateway/service_agent_endpoint.py +553 -0
  147. pocketshell-0.5.9/src/pocketshell/gateway/service_agent_firstuse.py +262 -0
  148. pocketshell-0.5.9/src/pocketshell/gateway/service_agent_install.py +748 -0
  149. pocketshell-0.5.9/src/pocketshell/gateway/service_common.py +250 -0
  150. pocketshell-0.5.9/src/pocketshell/gateway/service_endpoint.py +742 -0
  151. pocketshell-0.5.9/src/pocketshell/gateway/service_hostkey.py +122 -0
  152. pocketshell-0.5.9/src/pocketshell/gateway/service_linux.py +332 -0
  153. pocketshell-0.5.9/src/pocketshell/gateway/service_task_acl.py +296 -0
  154. pocketshell-0.5.9/src/pocketshell/gateway/service_user_agent.py +1258 -0
  155. pocketshell-0.5.9/src/pocketshell/gateway/service_windows.py +2014 -0
  156. pocketshell-0.5.9/src/pocketshell/gateway/service_windows_endpoint.py +504 -0
  157. pocketshell-0.5.9/src/pocketshell/gateway/sshcmd.py +329 -0
  158. pocketshell-0.5.9/src/pocketshell/gateway/status.py +1083 -0
  159. pocketshell-0.5.9/src/pocketshell/gateway/tokens.py +164 -0
  160. pocketshell-0.5.9/src/pocketshell/gateway/winssh.py +434 -0
  161. pocketshell-0.5.9/src/pocketshell/hooks/__init__.py +129 -0
  162. pocketshell-0.5.9/src/pocketshell/hooks/cli.py +133 -0
  163. pocketshell-0.5.9/src/pocketshell/hooks/handlers.py +236 -0
  164. pocketshell-0.5.9/src/pocketshell/hooks/installers.py +209 -0
  165. pocketshell-0.5.9/src/pocketshell/hooks/paths.py +158 -0
  166. pocketshell-0.5.9/src/pocketshell/hooks/providers/__init__.py +1 -0
  167. pocketshell-0.5.9/src/pocketshell/hooks/providers/claude.py +161 -0
  168. pocketshell-0.5.9/src/pocketshell/hooks/providers/codex.py +129 -0
  169. pocketshell-0.5.9/src/pocketshell/hooks/status.py +136 -0
  170. pocketshell-0.5.9/src/pocketshell/keys/__init__.py +11 -0
  171. pocketshell-0.5.9/src/pocketshell/keys/cli.py +264 -0
  172. pocketshell-0.5.9/src/pocketshell/keys/crypto.py +164 -0
  173. pocketshell-0.5.9/src/pocketshell/keys/prompt.py +76 -0
  174. pocketshell-0.5.9/src/pocketshell/keys/session.py +245 -0
  175. pocketshell-0.5.9/src/pocketshell/keys/sshkeys.py +225 -0
  176. pocketshell-0.5.9/src/pocketshell/keys/store.py +371 -0
  177. pocketshell-0.5.9/src/pocketshell/link/__init__.py +27 -0
  178. pocketshell-0.5.9/src/pocketshell/link/cli.py +133 -0
  179. pocketshell-0.5.9/src/pocketshell/link/client.py +228 -0
  180. pocketshell-0.5.9/src/pocketshell/link/daemon.py +499 -0
  181. pocketshell-0.5.9/src/pocketshell/link/protocol.py +83 -0
  182. pocketshell-0.5.9/src/pocketshell/link/relay.py +343 -0
  183. pocketshell-0.5.9/src/pocketshell/logs/__init__.py +102 -0
  184. pocketshell-0.5.9/src/pocketshell/logs/cli.py +152 -0
  185. pocketshell-0.5.9/src/pocketshell/logs/events.py +129 -0
  186. pocketshell-0.5.9/src/pocketshell/logs/hooks.py +115 -0
  187. pocketshell-0.5.9/src/pocketshell/logs/paths.py +109 -0
  188. pocketshell-0.5.9/src/pocketshell/logs/redact.py +126 -0
  189. pocketshell-0.5.9/src/pocketshell/profiles/__init__.py +86 -0
  190. pocketshell-0.5.9/src/pocketshell/profiles/cli.py +60 -0
  191. pocketshell-0.5.9/src/pocketshell/profiles/discovery.py +185 -0
  192. pocketshell-0.5.9/src/pocketshell/profiles/model.py +181 -0
  193. pocketshell-0.5.9/src/pocketshell/profiles/resolve.py +222 -0
  194. pocketshell-0.5.9/src/pocketshell/push/__init__.py +95 -0
  195. pocketshell-0.5.9/src/pocketshell/push/cli.py +46 -0
  196. pocketshell-0.5.9/src/pocketshell/push/events.py +152 -0
  197. pocketshell-0.5.9/src/pocketshell/push/fcm.py +156 -0
  198. pocketshell-0.5.9/src/pocketshell/push/store.py +119 -0
  199. pocketshell-0.5.9/src/pocketshell/repos/__init__.py +168 -0
  200. pocketshell-0.5.9/src/pocketshell/repos/cli.py +359 -0
  201. pocketshell-0.5.9/src/pocketshell/repos/handlers.py +285 -0
  202. pocketshell-0.5.9/src/pocketshell/repos/local.py +336 -0
  203. pocketshell-0.5.9/src/pocketshell/repos/model.py +175 -0
  204. pocketshell-0.5.9/src/pocketshell/repos/remote.py +257 -0
  205. pocketshell-0.5.9/src/pocketshell/repos/render.py +78 -0
  206. pocketshell-0.5.9/src/pocketshell/runtime/__init__.py +7 -0
  207. pocketshell-0.5.9/src/pocketshell/runtime/aplexer.py +392 -0
  208. pocketshell-0.5.8/src/pocketshell/cgroup_agents.py → pocketshell-0.5.9/src/pocketshell/runtime/cgroups.py +29 -25
  209. pocketshell-0.5.9/src/pocketshell/runtime/console_scripts.py +67 -0
  210. pocketshell-0.5.8/src/pocketshell/session_enum.py → pocketshell-0.5.9/src/pocketshell/runtime/sessions.py +82 -82
  211. pocketshell-0.5.9/src/pocketshell/sessions/__init__.py +91 -0
  212. pocketshell-0.5.9/src/pocketshell/sessions/attach.py +119 -0
  213. pocketshell-0.5.9/src/pocketshell/sessions/cli.py +12 -0
  214. pocketshell-0.5.9/src/pocketshell/sessions/create.py +355 -0
  215. pocketshell-0.5.9/src/pocketshell/sessions/kill.py +175 -0
  216. pocketshell-0.5.9/src/pocketshell/sessions/listing.py +105 -0
  217. pocketshell-0.5.9/src/pocketshell/sessions/rename.py +208 -0
  218. pocketshell-0.5.9/src/pocketshell/sessions/warnings.py +186 -0
  219. pocketshell-0.5.9/src/pocketshell/tokentls.py +77 -0
  220. pocketshell-0.5.9/src/pocketshell/tray/__init__.py +17 -0
  221. pocketshell-0.5.9/src/pocketshell/tray/__main__.py +10 -0
  222. pocketshell-0.5.9/src/pocketshell/tray/app.py +211 -0
  223. pocketshell-0.5.9/src/pocketshell/tray/autostart.py +221 -0
  224. pocketshell-0.5.9/src/pocketshell/tray/cli.py +131 -0
  225. pocketshell-0.5.9/src/pocketshell/tray/icons.py +98 -0
  226. pocketshell-0.5.9/src/pocketshell/tray/model.py +363 -0
  227. pocketshell-0.5.9/src/pocketshell/tray/single_instance.py +136 -0
  228. pocketshell-0.5.9/src/pocketshell/tray/status_client.py +198 -0
  229. pocketshell-0.5.9/src/pocketshell/tray_bundle.py +512 -0
  230. pocketshell-0.5.9/src/pocketshell/tray_repair.py +91 -0
  231. pocketshell-0.5.9/src/pocketshell/tray_supervisor.py +99 -0
  232. pocketshell-0.5.9/src/pocketshell/tree/__init__.py +130 -0
  233. pocketshell-0.5.9/src/pocketshell/tree/cli.py +112 -0
  234. pocketshell-0.5.9/src/pocketshell/tree/daemon.py +120 -0
  235. pocketshell-0.5.9/src/pocketshell/tree/model.py +345 -0
  236. pocketshell-0.5.9/src/pocketshell/tree/paths.py +70 -0
  237. pocketshell-0.5.9/src/pocketshell/tree/storage.py +112 -0
  238. pocketshell-0.5.9/src/pocketshell/tree/workspaces/__init__.py +15 -0
  239. pocketshell-0.5.8/src/pocketshell/workspaces.py → pocketshell-0.5.9/src/pocketshell/tree/workspaces/cli.py +3 -4
  240. pocketshell-0.5.9/src/pocketshell/tree/workspaces/membership.py +166 -0
  241. pocketshell-0.5.9/src/pocketshell/usage/__init__.py +97 -0
  242. pocketshell-0.5.9/src/pocketshell/usage/capture/__init__.py +85 -0
  243. pocketshell-0.5.9/src/pocketshell/usage/capture/durability.py +122 -0
  244. pocketshell-0.5.9/src/pocketshell/usage/capture/history.py +358 -0
  245. pocketshell-0.5.9/src/pocketshell/usage/capture/paths.py +100 -0
  246. pocketshell-0.5.9/src/pocketshell/usage/capture/quarantine.py +131 -0
  247. pocketshell-0.5.9/src/pocketshell/usage/cli.py +331 -0
  248. pocketshell-0.5.9/src/pocketshell/usage/normalize.py +146 -0
  249. pocketshell-0.5.9/src/pocketshell/usage/quse.py +131 -0
  250. pocketshell-0.5.9/src/pocketshell/usage/reset/__init__.py +94 -0
  251. pocketshell-0.5.9/src/pocketshell/usage/reset/detect.py +306 -0
  252. pocketshell-0.5.9/src/pocketshell/usage/reset/store.py +106 -0
  253. pocketshell-0.5.9/src/pocketshell/windows_security.py +269 -0
  254. pocketshell-0.5.9/src/pocketshell/windows_sessions.py +33 -0
  255. pocketshell-0.5.9/tests/account/test_account_basics.py +116 -0
  256. pocketshell-0.5.9/tests/account/test_account_broker.py +242 -0
  257. pocketshell-0.5.9/tests/account/test_account_cli.py +360 -0
  258. pocketshell-0.5.9/tests/account/test_account_credentials.py +233 -0
  259. pocketshell-0.5.9/tests/account/test_account_device_flow.py +376 -0
  260. pocketshell-0.5.9/tests/account/test_account_tls.py +261 -0
  261. pocketshell-0.5.9/tests/account/test_windows_private_storage.py +90 -0
  262. {pocketshell-0.5.8 → pocketshell-0.5.9}/tests/conftest.py +19 -0
  263. pocketshell-0.5.9/tests/data/quse-0.0.17-gemini.json +71 -0
  264. pocketshell-0.5.9/tests/data/quse-0.0.17-gemini.provenance.txt +30 -0
  265. pocketshell-0.5.9/tests/docker/link/e2e.sh +76 -0
  266. pocketshell-0.5.9/tests/docker/link/e2e_client.py +66 -0
  267. pocketshell-0.5.9/tests/docker/link/host_entry.py +30 -0
  268. pocketshell-0.5.9/tests/docker/link/relay_entry.py +28 -0
  269. pocketshell-0.5.9/tests/fake_broker.py +170 -0
  270. pocketshell-0.5.9/tests/fixtures/aplexer/README.md +15 -0
  271. {pocketshell-0.5.8 → pocketshell-0.5.9}/tests/fixtures/aplexer/snapshot-agent.json +1 -1
  272. {pocketshell-0.5.8 → pocketshell-0.5.9}/tests/fixtures/aplexer/snapshot-crashed-start.json +2 -1
  273. {pocketshell-0.5.8 → pocketshell-0.5.9}/tests/fixtures/aplexer/snapshot-liveness-mix.json +8 -4
  274. {pocketshell-0.5.8 → pocketshell-0.5.9}/tests/fixtures/aplexer/snapshot-mid-create.json +2 -1
  275. {pocketshell-0.5.8 → pocketshell-0.5.9}/tests/fixtures/aplexer/snapshot-post-kill-window.json +6 -3
  276. {pocketshell-0.5.8 → pocketshell-0.5.9}/tests/fixtures/aplexer/snapshot-reported-state.json +6 -3
  277. {pocketshell-0.5.8 → pocketshell-0.5.9}/tests/fixtures/aplexer/snapshot.json +8 -4
  278. pocketshell-0.5.9/tests/gateway/agent_harness.py +32 -0
  279. pocketshell-0.5.9/tests/gateway/conftest.py +196 -0
  280. pocketshell-0.5.9/tests/gateway/fake_gateway.py +121 -0
  281. pocketshell-0.5.9/tests/gateway/fakeguardian/go.mod +8 -0
  282. pocketshell-0.5.9/tests/gateway/fakeguardian/go.sum +6 -0
  283. pocketshell-0.5.9/tests/gateway/fakeguardian/main.go +463 -0
  284. pocketshell-0.5.9/tests/gateway/fakelink/main.go +94 -0
  285. pocketshell-0.5.9/tests/gateway/fixtures/ordinary-v2-authority.schema.json +1241 -0
  286. pocketshell-0.5.9/tests/gateway/fixtures/task-object-authority.ps1 +22 -0
  287. pocketshell-0.5.9/tests/gateway/gateway_keyblobs.py +42 -0
  288. pocketshell-0.5.9/tests/gateway/test_bundled_hostkey.py +13 -0
  289. pocketshell-0.5.9/tests/gateway/test_gateway_agent_firstuse.py +338 -0
  290. pocketshell-0.5.9/tests/gateway/test_gateway_agent_install.py +560 -0
  291. pocketshell-0.5.9/tests/gateway/test_gateway_agent_resume.py +107 -0
  292. pocketshell-0.5.9/tests/gateway/test_gateway_agent_setup_cli.py +594 -0
  293. pocketshell-0.5.9/tests/gateway/test_gateway_cli.py +552 -0
  294. pocketshell-0.5.9/tests/gateway/test_gateway_connect_e2e.py +231 -0
  295. pocketshell-0.5.9/tests/gateway/test_gateway_devices.py +408 -0
  296. pocketshell-0.5.9/tests/gateway/test_gateway_endpoint.py +194 -0
  297. pocketshell-0.5.9/tests/gateway/test_gateway_endpoint_setup.py +949 -0
  298. pocketshell-0.5.9/tests/gateway/test_gateway_enroll_login.py +226 -0
  299. pocketshell-0.5.9/tests/gateway/test_gateway_exec_passthrough.py +700 -0
  300. pocketshell-0.5.9/tests/gateway/test_gateway_helper_metadata.py +565 -0
  301. pocketshell-0.5.9/tests/gateway/test_gateway_helper_resolution.py +183 -0
  302. pocketshell-0.5.9/tests/gateway/test_gateway_helper_wheel.py +360 -0
  303. pocketshell-0.5.9/tests/gateway/test_gateway_pins.py +453 -0
  304. pocketshell-0.5.9/tests/gateway/test_gateway_proxy.py +408 -0
  305. pocketshell-0.5.9/tests/gateway/test_gateway_service.py +1185 -0
  306. pocketshell-0.5.9/tests/gateway/test_gateway_service_endpoint.py +1095 -0
  307. pocketshell-0.5.9/tests/gateway/test_gateway_service_task_acl.py +102 -0
  308. pocketshell-0.5.9/tests/gateway/test_gateway_service_task_object.py +80 -0
  309. pocketshell-0.5.9/tests/gateway/test_gateway_ssh.py +442 -0
  310. pocketshell-0.5.9/tests/gateway/test_gateway_ssh_key.py +296 -0
  311. pocketshell-0.5.9/tests/gateway/test_gateway_ssh_key_e2e.py +290 -0
  312. pocketshell-0.5.9/tests/gateway/test_gateway_status.py +507 -0
  313. pocketshell-0.5.9/tests/gateway/test_gateway_user_agent.py +813 -0
  314. pocketshell-0.5.9/tests/gateway/test_private_endpoint.py +195 -0
  315. pocketshell-0.5.9/tests/gateway/test_windows_agent_install_native.py +162 -0
  316. pocketshell-0.5.9/tests/gateway/test_windows_aplexer_probe_native.py +50 -0
  317. pocketshell-0.5.9/tests/gateway/test_windows_complete_runtime_native.py +340 -0
  318. pocketshell-0.5.9/tests/gateway/test_windows_endpoint_keys_native.py +141 -0
  319. pocketshell-0.5.9/tests/gateway/test_windows_gateway_e2e.py +471 -0
  320. pocketshell-0.5.9/tests/gateway/test_windows_gateway_service_native.py +628 -0
  321. pocketshell-0.5.9/tests/gateway/test_windows_gateway_user_agent_native.py +252 -0
  322. pocketshell-0.5.9/tests/gateway/test_windows_helper_execution.py +490 -0
  323. pocketshell-0.5.9/tests/gateway/test_windows_launcher_quiet_native.py +69 -0
  324. pocketshell-0.5.9/tests/gateway/test_windows_release_closure_native.py +194 -0
  325. pocketshell-0.5.9/tests/gateway/test_windows_service_private_read.py +78 -0
  326. pocketshell-0.5.9/tests/gateway/test_windows_spawn_entry_tree_native.py +220 -0
  327. pocketshell-0.5.9/tests/gateway/test_windows_sshcmd.py +40 -0
  328. pocketshell-0.5.9/tests/gateway/test_windows_verify_native.py +625 -0
  329. pocketshell-0.5.9/tests/gateway/test_windows_winssh_native.py +153 -0
  330. pocketshell-0.5.9/tests/gateway/test_winssh.py +549 -0
  331. pocketshell-0.5.9/tests/gateway/unelevated.py +304 -0
  332. pocketshell-0.5.9/tests/keys/conftest.py +56 -0
  333. pocketshell-0.5.9/tests/keys/keyhelpers.py +23 -0
  334. pocketshell-0.5.9/tests/keys/test_keys_cli.py +276 -0
  335. pocketshell-0.5.9/tests/keys/test_keys_crypto.py +125 -0
  336. pocketshell-0.5.9/tests/keys/test_keys_store.py +181 -0
  337. pocketshell-0.5.9/tests/link/test_adversarial_security.py +334 -0
  338. pocketshell-0.5.9/tests/link/test_cli_link.py +180 -0
  339. pocketshell-0.5.9/tests/link/test_exec_semantics.py +294 -0
  340. pocketshell-0.5.9/tests/link/test_loopback.py +253 -0
  341. pocketshell-0.5.9/tests/link/test_protocol.py +71 -0
  342. pocketshell-0.5.9/tests/link/test_resilience.py +444 -0
  343. pocketshell-0.5.9/tests/link/test_workload_integrity.py +302 -0
  344. pocketshell-0.5.9/tests/release/test_build_backend.py +110 -0
  345. pocketshell-0.5.9/tests/release/test_tray_installer.py +275 -0
  346. {pocketshell-0.5.8 → pocketshell-0.5.9}/tests/test_agent_card_push.py +2 -1
  347. {pocketshell-0.5.8 → pocketshell-0.5.9}/tests/test_agent_log.py +4 -3
  348. {pocketshell-0.5.8 → pocketshell-0.5.9}/tests/test_agents.py +18 -32
  349. {pocketshell-0.5.8 → pocketshell-0.5.9}/tests/test_agents_kind.py +23 -2
  350. pocketshell-0.5.9/tests/test_antigravity.py +78 -0
  351. {pocketshell-0.5.8 → pocketshell-0.5.9}/tests/test_aplexer_contract.py +387 -5
  352. {pocketshell-0.5.8 → pocketshell-0.5.9}/tests/test_aplexer_resolution.py +265 -2
  353. pocketshell-0.5.8/tests/test_prune_attachments.py → pocketshell-0.5.9/tests/test_attachments.py +1 -1
  354. {pocketshell-0.5.8 → pocketshell-0.5.9}/tests/test_cards.py +7 -6
  355. {pocketshell-0.5.8 → pocketshell-0.5.9}/tests/test_cards_push_notify.py +3 -3
  356. {pocketshell-0.5.8 → pocketshell-0.5.9}/tests/test_cgroup_agents.py +2 -2
  357. {pocketshell-0.5.8 → pocketshell-0.5.9}/tests/test_daemon.py +88 -82
  358. {pocketshell-0.5.8 → pocketshell-0.5.9}/tests/test_daemon_fallback.py +39 -49
  359. pocketshell-0.5.9/tests/test_daemon_wire.py +986 -0
  360. {pocketshell-0.5.8 → pocketshell-0.5.9}/tests/test_engines.py +4 -2
  361. {pocketshell-0.5.8 → pocketshell-0.5.9}/tests/test_hooks.py +4 -4
  362. pocketshell-0.5.9/tests/test_main.py +69 -0
  363. {pocketshell-0.5.8 → pocketshell-0.5.9}/tests/test_push.py +1 -1
  364. {pocketshell-0.5.8 → pocketshell-0.5.9}/tests/test_repos.py +1 -1
  365. pocketshell-0.5.9/tests/test_serve_http.py +207 -0
  366. {pocketshell-0.5.8 → pocketshell-0.5.9}/tests/test_session_cgroup_kernel_proof.py +13 -46
  367. pocketshell-0.5.9/tests/test_session_enum.py +281 -0
  368. {pocketshell-0.5.8 → pocketshell-0.5.9}/tests/test_sessions.py +7 -5
  369. {pocketshell-0.5.8 → pocketshell-0.5.9}/tests/test_sessions_attach.py +8 -6
  370. {pocketshell-0.5.8 → pocketshell-0.5.9}/tests/test_sessions_create_routing.py +44 -15
  371. {pocketshell-0.5.8 → pocketshell-0.5.9}/tests/test_sessions_kill.py +14 -9
  372. {pocketshell-0.5.8 → pocketshell-0.5.9}/tests/test_sessions_mem_cap.py +1 -1
  373. pocketshell-0.5.9/tests/test_sessions_rename.py +168 -0
  374. pocketshell-0.5.9/tests/test_sessions_warnings.py +197 -0
  375. {pocketshell-0.5.8 → pocketshell-0.5.9}/tests/test_tree.py +11 -9
  376. {pocketshell-0.5.8 → pocketshell-0.5.9}/tests/test_usage.py +223 -75
  377. {pocketshell-0.5.8 → pocketshell-0.5.9}/tests/test_usage_capture.py +13 -12
  378. {pocketshell-0.5.8 → pocketshell-0.5.9}/tests/test_usage_reset.py +2 -2
  379. pocketshell-0.5.9/tests/test_windows_startup.py +85 -0
  380. {pocketshell-0.5.8 → pocketshell-0.5.9}/tests/test_workspaces.py +1 -1
  381. pocketshell-0.5.9/tests/tray/__init__.py +1 -0
  382. pocketshell-0.5.9/tests/tray/conftest.py +15 -0
  383. pocketshell-0.5.9/tests/tray/test_app.py +136 -0
  384. pocketshell-0.5.9/tests/tray/test_autostart.py +131 -0
  385. pocketshell-0.5.9/tests/tray/test_bundle.py +159 -0
  386. pocketshell-0.5.9/tests/tray/test_cli.py +78 -0
  387. pocketshell-0.5.9/tests/tray/test_endpoint_native.py +35 -0
  388. pocketshell-0.5.9/tests/tray/test_icons.py +43 -0
  389. pocketshell-0.5.9/tests/tray/test_model.py +260 -0
  390. pocketshell-0.5.9/tests/tray/test_private_replacement.py +18 -0
  391. pocketshell-0.5.9/tests/tray/test_repair.py +80 -0
  392. pocketshell-0.5.9/tests/tray/test_single_instance.py +92 -0
  393. pocketshell-0.5.9/tests/tray/test_status_client.py +139 -0
  394. pocketshell-0.5.9/tests/tray/test_supervisor.py +69 -0
  395. pocketshell-0.5.9/tests/tray/test_windows_sessions.py +23 -0
  396. pocketshell-0.5.9/uv.lock +692 -0
  397. pocketshell-0.5.8/src/pocketshell/agent_log.py +0 -932
  398. pocketshell-0.5.8/src/pocketshell/agents.py +0 -857
  399. pocketshell-0.5.8/src/pocketshell/aplexer.py +0 -242
  400. pocketshell-0.5.8/src/pocketshell/cards.py +0 -892
  401. pocketshell-0.5.8/src/pocketshell/daemon.py +0 -1714
  402. pocketshell-0.5.8/src/pocketshell/engines.py +0 -928
  403. pocketshell-0.5.8/src/pocketshell/env.py +0 -678
  404. pocketshell-0.5.8/src/pocketshell/hooks.py +0 -1184
  405. pocketshell-0.5.8/src/pocketshell/logs.py +0 -677
  406. pocketshell-0.5.8/src/pocketshell/profiles.py +0 -579
  407. pocketshell-0.5.8/src/pocketshell/prune_attachments.py +0 -372
  408. pocketshell-0.5.8/src/pocketshell/push.py +0 -465
  409. pocketshell-0.5.8/src/pocketshell/repos.py +0 -1532
  410. pocketshell-0.5.8/src/pocketshell/sessions.py +0 -724
  411. pocketshell-0.5.8/src/pocketshell/tree.py +0 -854
  412. pocketshell-0.5.8/src/pocketshell/usage.py +0 -554
  413. pocketshell-0.5.8/src/pocketshell/usage_capture.py +0 -648
  414. pocketshell-0.5.8/src/pocketshell/usage_reset.py +0 -369
  415. pocketshell-0.5.8/tests/test_session_enum.py +0 -93
  416. pocketshell-0.5.8/uv.lock +0 -406
  417. {pocketshell-0.5.8 → pocketshell-0.5.9}/.gitignore +0 -0
  418. {pocketshell-0.5.8 → pocketshell-0.5.9}/LICENSE +0 -0
  419. {pocketshell-0.5.8 → pocketshell-0.5.9}/scheduler/README.md +0 -0
  420. {pocketshell-0.5.8 → pocketshell-0.5.9}/scheduler/pocketshell-usage-capture.service +0 -0
  421. {pocketshell-0.5.8 → pocketshell-0.5.9}/scheduler/pocketshell-usage-capture.timer +0 -0
  422. {pocketshell-0.5.8 → pocketshell-0.5.9}/scripts/check-cgroup-cap-proof.sh +0 -0
  423. {pocketshell-0.5.8 → pocketshell-0.5.9}/scripts/check-product-tmux-absent.sh +0 -0
  424. {pocketshell-0.5.8 → pocketshell-0.5.9}/scripts/check-python-ci-lock.sh +0 -0
  425. {pocketshell-0.5.8 → pocketshell-0.5.9}/scripts/sync-readme-exit-codes.py +0 -0
  426. {pocketshell-0.5.8 → pocketshell-0.5.9}/src/pocketshell/__init__.py +0 -0
  427. {pocketshell-0.5.8 → pocketshell-0.5.9}/src/pocketshell/__main__.py +0 -0
  428. {pocketshell-0.5.8 → pocketshell-0.5.9}/src/pocketshell/github.py +0 -0
  429. {pocketshell-0.5.8/src/pocketshell → pocketshell-0.5.9/src/pocketshell/runtime}/memcap.py +0 -0
  430. {pocketshell-0.5.8 → pocketshell-0.5.9}/src/pocketshell/serve.py +0 -0
  431. {pocketshell-0.5.8 → pocketshell-0.5.9}/tests/__init__.py +0 -0
  432. {pocketshell-0.5.8 → pocketshell-0.5.9}/tests/data/quse-0.0.11-usage.json +0 -0
  433. {pocketshell-0.5.8 → pocketshell-0.5.9}/tests/data/quse-0.0.13-usage.json +0 -0
  434. {pocketshell-0.5.8 → pocketshell-0.5.9}/tests/data/quse-0.0.15-usage.json +0 -0
  435. {pocketshell-0.5.8 → pocketshell-0.5.9}/tests/data/quse-0.0.15-usage.ndjson +0 -0
  436. {pocketshell-0.5.8 → pocketshell-0.5.9}/tests/data/quse-0.0.15-usage.provenance.txt +0 -0
  437. {pocketshell-0.5.8 → pocketshell-0.5.9}/tests/data/quse-0.0.9-usage.json +0 -0
  438. {pocketshell-0.5.8 → pocketshell-0.5.9}/tests/data/sshd_anchor/Dockerfile.from-unanchored-base +0 -0
  439. {pocketshell-0.5.8 → pocketshell-0.5.9}/tests/test_cli.py +0 -0
  440. {pocketshell-0.5.8 → pocketshell-0.5.9}/tests/test_env.py +0 -0
  441. {pocketshell-0.5.8 → pocketshell-0.5.9}/tests/test_github.py +0 -0
  442. {pocketshell-0.5.8 → pocketshell-0.5.9}/tests/test_logs.py +0 -0
  443. {pocketshell-0.5.8 → pocketshell-0.5.9}/tests/test_profiles.py +0 -0
  444. {pocketshell-0.5.8 → pocketshell-0.5.9}/tests/test_serve.py +0 -0
@@ -0,0 +1,2 @@
1
+ tests/gateway/fixtures/task-object-authority.ps1 -text
2
+ release/inputs/** -text
@@ -1,3 +1,40 @@
1
+ Metadata-Version: 2.5
2
+ Name: pocketshell
3
+ Version: 0.5.9
4
+ Summary: Unified server-side Python utility for the PocketShell Android and desktop clients.
5
+ Project-URL: Homepage, https://github.com/PocketShell-io/pocketshell-cli
6
+ Project-URL: Issues, https://github.com/PocketShell-io/pocketshell-cli/issues
7
+ Author: Alexey Grigorev
8
+ License: MIT
9
+ License-File: LICENSE
10
+ Keywords: agents,pocketshell,ssh,usage
11
+ Classifier: Development Status :: 3 - Alpha
12
+ Classifier: Environment :: Console
13
+ Classifier: Intended Audience :: Developers
14
+ Classifier: License :: OSI Approved :: MIT License
15
+ Classifier: Programming Language :: Python :: 3
16
+ Classifier: Programming Language :: Python :: 3.11
17
+ Classifier: Programming Language :: Python :: 3.12
18
+ Classifier: Programming Language :: Python :: 3.13
19
+ Classifier: Topic :: Software Development
20
+ Classifier: Topic :: System :: Monitoring
21
+ Requires-Python: >=3.11
22
+ Requires-Dist: aplexer==0.1.8; sys_platform == 'linux'
23
+ Requires-Dist: click>=8.2.0
24
+ Requires-Dist: cryptography>=42
25
+ Requires-Dist: google-auth>=2.0.0
26
+ Requires-Dist: pyyaml>=6.0
27
+ Requires-Dist: quse>=0.0.15
28
+ Provides-Extra: dev
29
+ Requires-Dist: pytest>=8.4.0; extra == 'dev'
30
+ Requires-Dist: ruff>=0.15.0; extra == 'dev'
31
+ Provides-Extra: link
32
+ Requires-Dist: websockets<17,>=15; extra == 'link'
33
+ Provides-Extra: tray
34
+ Requires-Dist: pillow>=10.0.0; extra == 'tray'
35
+ Requires-Dist: pystray>=0.19.5; extra == 'tray'
36
+ Description-Content-Type: text/markdown
37
+
1
38
  # pocketshell
2
39
 
3
40
  Unified server-side Python utility for the [PocketShell](https://github.com/PocketShell-io/pocketshell)
@@ -57,6 +94,8 @@ pocketshell sessions list --json # schema-3 aplexer session rows
57
94
  pocketshell sessions create NAME --json # create or reuse a session
58
95
  pocketshell sessions attach NAME # attach to a live session
59
96
  pocketshell sessions kill NAME --json # stop and reap a session
97
+ pocketshell sessions warnings [--json] # unacknowledged crash/OOM warnings
98
+ pocketshell sessions ack [NAME] [--json] # acknowledge crash warnings
60
99
  pocketshell agent-log ... # agent conversation logs
61
100
  pocketshell repos list ... # local / GitHub repositories
62
101
  pocketshell github status [--json] # gh install / auth state
@@ -65,6 +104,11 @@ pocketshell hooks ... # Claude/Codex/OpenCode hooks
65
104
  pocketshell logs ... # server-side trace sink
66
105
  pocketshell daemon ... # IPC daemon lifecycle
67
106
  pocketshell serve --dir PATH [--port N] # foreground static HTTP server
107
+ pocketshell gateway enroll|run|show # gateway host agent (docs/gateway.md)
108
+ pocketshell login [--label T] [--no-open] # device-flow account login (docs/account.md)
109
+ pocketshell whoami [--json] # show the logged-in account
110
+ pocketshell logout # revoke and delete the CLI session
111
+ pocketshell keys add|generate|list|public|remove|passwd # device-password SSH key vault (docs/keys.md)
68
112
  ```
69
113
 
70
114
  Run `pocketshell --help` or `pocketshell <command> --help` for the live
@@ -84,6 +128,8 @@ pocketshell sessions list --json
84
128
  pocketshell sessions create my-session --cwd ~/git/project --mem none --json
85
129
  pocketshell sessions attach my-session
86
130
  pocketshell sessions kill my-session --json
131
+ pocketshell sessions warnings --json
132
+ pocketshell sessions ack my-session
87
133
  ```
88
134
 
89
135
  The list and lifecycle responses use schema 3. Rows carry the aplexer id,
@@ -92,6 +138,13 @@ backend discriminator or legacy session socket. Create is idempotent for the
92
138
  same workspace and tag. Kill stops the workload and reaps the aplexer record
93
139
  before returning its JSON result.
94
140
 
141
+ Crash/OOM warnings are ack-gated: when aplexer records a session as
142
+ OOM-killed, dead without an exit, or finalized with a fatal error, a durable
143
+ warning rides every human `sessions list` (and `sessions warnings` lists them
144
+ all) and survives until an explicit `sessions ack NAME` — or a bare
145
+ `sessions ack` for everything. The JSON listing is untouched; the banner
146
+ stays hidden on bundled aplexer builds without the warnings subcommand.
147
+
95
148
  ### `pocketshell usage`
96
149
 
97
150
  ```text
@@ -331,6 +384,15 @@ Android app (extraction: PocketShell-io/pocketshell#2643). The `version` in
331
384
  refuses to publish if `dist/` does not carry exactly the tagged version,
332
385
  and publishes to PyPI.
333
386
  3. Hosts pick it up with `uv tool upgrade pocketshell`.
387
+ 4. **Reinstall THIS box's own CLI and smoke-check it**
388
+ (`scripts/reinstall-box-cli.sh vX.Y.Z`). This machine is both the dev box
389
+ and the live server the phone connects to; a green publish does not touch
390
+ the `uv tool`-installed binary, so skipping this step ships a release the
391
+ phone cannot actually use (the 2026-09-10 `workspaces` outage — issue
392
+ #15). The script overrides the global 7-day `exclude-newer` cutoff (a
393
+ just-published version is invisible to it), forces the reinstall at the
394
+ tagged version, and fails unless `pocketshell --version` reports the tag
395
+ and `pocketshell workspaces list --host <h> --json` exits 0.
334
396
 
335
397
  CI (`.github/workflows/ci.yml`) runs the pytest suite plus the packaging and
336
398
  frozen-lock guards on every PR and every push to `main`. The first
@@ -1,34 +1,3 @@
1
- Metadata-Version: 2.5
2
- Name: pocketshell
3
- Version: 0.5.8
4
- Summary: Unified server-side Python utility for the PocketShell Android and desktop clients.
5
- Project-URL: Homepage, https://github.com/PocketShell-io/pocketshell-cli
6
- Project-URL: Issues, https://github.com/PocketShell-io/pocketshell-cli/issues
7
- Author: Alexey Grigorev
8
- License: MIT
9
- License-File: LICENSE
10
- Keywords: agents,pocketshell,ssh,usage
11
- Classifier: Development Status :: 3 - Alpha
12
- Classifier: Environment :: Console
13
- Classifier: Intended Audience :: Developers
14
- Classifier: License :: OSI Approved :: MIT License
15
- Classifier: Programming Language :: Python :: 3
16
- Classifier: Programming Language :: Python :: 3.11
17
- Classifier: Programming Language :: Python :: 3.12
18
- Classifier: Programming Language :: Python :: 3.13
19
- Classifier: Topic :: Software Development
20
- Classifier: Topic :: System :: Monitoring
21
- Requires-Python: >=3.11
22
- Requires-Dist: aplexer==0.1.5; sys_platform == 'linux'
23
- Requires-Dist: click>=8.2.0
24
- Requires-Dist: google-auth>=2.0.0
25
- Requires-Dist: pyyaml>=6.0
26
- Requires-Dist: quse==0.0.15
27
- Provides-Extra: dev
28
- Requires-Dist: pytest>=8.4.0; extra == 'dev'
29
- Requires-Dist: ruff>=0.15.0; extra == 'dev'
30
- Description-Content-Type: text/markdown
31
-
32
1
  # pocketshell
33
2
 
34
3
  Unified server-side Python utility for the [PocketShell](https://github.com/PocketShell-io/pocketshell)
@@ -88,6 +57,8 @@ pocketshell sessions list --json # schema-3 aplexer session rows
88
57
  pocketshell sessions create NAME --json # create or reuse a session
89
58
  pocketshell sessions attach NAME # attach to a live session
90
59
  pocketshell sessions kill NAME --json # stop and reap a session
60
+ pocketshell sessions warnings [--json] # unacknowledged crash/OOM warnings
61
+ pocketshell sessions ack [NAME] [--json] # acknowledge crash warnings
91
62
  pocketshell agent-log ... # agent conversation logs
92
63
  pocketshell repos list ... # local / GitHub repositories
93
64
  pocketshell github status [--json] # gh install / auth state
@@ -96,6 +67,11 @@ pocketshell hooks ... # Claude/Codex/OpenCode hooks
96
67
  pocketshell logs ... # server-side trace sink
97
68
  pocketshell daemon ... # IPC daemon lifecycle
98
69
  pocketshell serve --dir PATH [--port N] # foreground static HTTP server
70
+ pocketshell gateway enroll|run|show # gateway host agent (docs/gateway.md)
71
+ pocketshell login [--label T] [--no-open] # device-flow account login (docs/account.md)
72
+ pocketshell whoami [--json] # show the logged-in account
73
+ pocketshell logout # revoke and delete the CLI session
74
+ pocketshell keys add|generate|list|public|remove|passwd # device-password SSH key vault (docs/keys.md)
99
75
  ```
100
76
 
101
77
  Run `pocketshell --help` or `pocketshell <command> --help` for the live
@@ -115,6 +91,8 @@ pocketshell sessions list --json
115
91
  pocketshell sessions create my-session --cwd ~/git/project --mem none --json
116
92
  pocketshell sessions attach my-session
117
93
  pocketshell sessions kill my-session --json
94
+ pocketshell sessions warnings --json
95
+ pocketshell sessions ack my-session
118
96
  ```
119
97
 
120
98
  The list and lifecycle responses use schema 3. Rows carry the aplexer id,
@@ -123,6 +101,13 @@ backend discriminator or legacy session socket. Create is idempotent for the
123
101
  same workspace and tag. Kill stops the workload and reaps the aplexer record
124
102
  before returning its JSON result.
125
103
 
104
+ Crash/OOM warnings are ack-gated: when aplexer records a session as
105
+ OOM-killed, dead without an exit, or finalized with a fatal error, a durable
106
+ warning rides every human `sessions list` (and `sessions warnings` lists them
107
+ all) and survives until an explicit `sessions ack NAME` — or a bare
108
+ `sessions ack` for everything. The JSON listing is untouched; the banner
109
+ stays hidden on bundled aplexer builds without the warnings subcommand.
110
+
126
111
  ### `pocketshell usage`
127
112
 
128
113
  ```text
@@ -362,6 +347,15 @@ Android app (extraction: PocketShell-io/pocketshell#2643). The `version` in
362
347
  refuses to publish if `dist/` does not carry exactly the tagged version,
363
348
  and publishes to PyPI.
364
349
  3. Hosts pick it up with `uv tool upgrade pocketshell`.
350
+ 4. **Reinstall THIS box's own CLI and smoke-check it**
351
+ (`scripts/reinstall-box-cli.sh vX.Y.Z`). This machine is both the dev box
352
+ and the live server the phone connects to; a green publish does not touch
353
+ the `uv tool`-installed binary, so skipping this step ships a release the
354
+ phone cannot actually use (the 2026-09-10 `workspaces` outage — issue
355
+ #15). The script overrides the global 7-day `exclude-newer` cutoff (a
356
+ just-published version is invisible to it), forces the reinstall at the
357
+ tagged version, and fails unless `pocketshell --version` reports the tag
358
+ and `pocketshell workspaces list --host <h> --json` exits 0.
365
359
 
366
360
  CI (`.github/workflows/ci.yml`) runs the pytest suite plus the packaging and
367
361
  frozen-lock guards on every PR and every push to `main`. The first
@@ -0,0 +1,193 @@
1
+ # Account login: `pocketshell login` / `logout` / `whoami`
2
+
3
+ `pocketshell login` connects this machine to your PocketShell account with a
4
+ device-authorization flow, like `gh auth login` or `aws sso login`. It's built
5
+ for machines where pasting a token is awkward: an SSH session, a headless box,
6
+ or a laptop with no browser session. Gateway commands such as
7
+ `pocketshell gateway enroll` then get their short-lived broker token on their
8
+ own, so you never handle a token yourself.
9
+
10
+ ```text
11
+ pocketshell login [--label TEXT] [--no-open] [--force]
12
+ pocketshell whoami [--json]
13
+ pocketshell logout
14
+ ```
15
+
16
+ ## Logging in
17
+
18
+ ```console
19
+ $ pocketshell login
20
+ To log in, open: https://app.pocketshell.io/device?code=BCDF-GHJK
21
+ Confirm the code shown in the browser matches: BCDF-GHJK
22
+ The page will ask you to type its last 4 characters before approving.
23
+ Waiting for approval (Ctrl+C to cancel)...
24
+ Logged in as you@example.com.
25
+ ```
26
+
27
+ 1. The CLI asks the broker for a pairing (`POST /auth/device/start`) and
28
+ labels it `user@hostname`, or the value of `--label` (at most 80 printable
29
+ characters). The approval page shows this label so you can tell which
30
+ machine is asking.
31
+ 2. It prints the code and the verification URL. If a browser is available
32
+ and you didn't pass `--no-open`, it also opens the pre-filled URL. The
33
+ code must have the form `XXXX-XXXX`, using only the letters
34
+ `BCDFGHJKLMNPQRSTVWXZ` and the digits `2`-`9`. `login` refuses any other
35
+ code and doesn't print it.
36
+ 3. Sign in on the page, check that the code and label match what the
37
+ terminal shows, type the code's last 4 characters when the page asks
38
+ (it asks even when you opened the pre-filled link), and approve.
39
+ 4. The CLI polls at the interval the broker asks for, and adds 5 seconds
40
+ whenever the broker answers `slow_down`. It stops with a clear message
41
+ when you deny the request or the code expires (10 minutes). Press Ctrl+C
42
+ to cancel cleanly (exit 130).
43
+ 5. The CLI checks the new session with `GET /cli/session` and then saves it.
44
+
45
+ You can review and revoke your CLI sessions at
46
+ <https://app.pocketshell.io/device/sessions>. `whoami` prints this link too.
47
+
48
+ If you're already logged in with a session that hasn't expired, `login`
49
+ refuses to replace it and exits 1. Run `pocketshell logout` first, or run
50
+ `pocketshell login --force`. With `--force`, the old session is revoked
51
+ once the new one is saved. You don't need `--force` to replace an expired
52
+ session.
53
+
54
+ ## Commands that use the login
55
+
56
+ The session token never leaves this machine except to talk to the broker
57
+ that issued it. That broker's URL is stored with the session at login, and
58
+ `whoami`, `logout` and every token mint use only that stored URL.
59
+ `POCKETSHELL_BROKER_URL` is ignored for an existing session. If it is set to
60
+ a different broker (by accident, or by a hostile `.envrc`), the command
61
+ refuses to send the session anywhere and tells you to unset the variable or
62
+ run `pocketshell login --force` for that broker. Other commands call
63
+ `pocketshell.account.mint_gateway_token()` to exchange it for a broker JWT
64
+ (`POST /cli/gateway/token`). That JWT is valid for at most 5 minutes and is
65
+ the same token `POST /gateway/token` mints for the app. If the broker answers
66
+ 401, the commands report "run `pocketshell login`".
67
+
68
+ ## `whoami`
69
+
70
+ `whoami` prints the account, the session label, the broker and the expiry,
71
+ followed by the link where you can review or revoke sessions,
72
+ <https://app.pocketshell.io/device/sessions>. It also checks the session with
73
+ the broker. If the broker can't be reached, it
74
+ shows the local copy and marks it `verified: no`, with a warning on stderr.
75
+ `--json` prints:
76
+
77
+ ```json
78
+ {"broker_url": "...", "email": "...", "expires_at": 1767225600,
79
+ "label": "you@laptop", "logged_in": true, "token_id": "...", "verified": true}
80
+ ```
81
+
82
+ When you're not logged in, `whoami --json` prints `{"logged_in": false}` and
83
+ exits 1. When `POCKETSHELL_BROKER_URL` points to a different broker than the
84
+ one you logged in to, `whoami` doesn't contact any broker. It shows the local
85
+ copy as `verified: no` and prints a warning.
86
+
87
+ ## `logout`
88
+
89
+ `logout` revokes the session on the broker (`POST /cli/logout`, best effort)
90
+ and deletes the credentials file. If the broker can't be reached, the file
91
+ is still deleted, and a warning says how long the session stays valid on
92
+ the server. The same happens when `POCKETSHELL_BROKER_URL` names a different
93
+ broker: the session isn't sent there. A `401` from the broker means the
94
+ session is already gone (revoked, expired, or idle for 14 days) and counts
95
+ as logged out.
96
+
97
+ The one exception is `429 rate_limited`: the broker throttles a network
98
+ after too many failed bearer lookups, and the session was **not** revoked.
99
+ `logout` then keeps the credentials file, exits 1 and asks you to run
100
+ `pocketshell logout` again shortly, so the still-valid session doesn't end
101
+ up orphaned on the server. Elsewhere a `429` on `/cli/session` or
102
+ `/cli/gateway/token` is reported as "the broker is rate limiting requests,
103
+ try again shortly" — never as "not logged in", and it never deletes the
104
+ credentials file.
105
+
106
+ ## Credentials file
107
+
108
+ `${XDG_CONFIG_HOME:-~/.config}/pocketshell/credentials.json`:
109
+
110
+ ```json
111
+ {"version": 1, "broker_url": "...", "access_token": "psc_...", "token_id": "...",
112
+ "email": "...", "expires_at": 1767225600, "label": "you@laptop"}
113
+ ```
114
+
115
+ - **Written atomically and private from the start.** The directory is created
116
+ with mode 0700, and an existing directory you own is tightened to 0700. The
117
+ file is written to a new temporary name opened with
118
+ `O_CREAT|O_EXCL|O_NOFOLLOW` and mode 0600, fsynced, and moved into place with
119
+ `os.replace`. The token is never on disk with wider permissions, even for a
120
+ moment. There's no chmod after the write.
121
+ - **Checked before every read.** The file is ignored, and treated as "not
122
+ logged in" with a message explaining why, when it is a symlink or not a
123
+ regular file, isn't owned by you, can be read or written by your group or
124
+ other users, or sits in a directory that others can write to. The message
125
+ never includes the file's contents. A file that's only too permissive still
126
+ holds your own token, so `pocketshell logout` revokes it before deleting it.
127
+ For a symlink or a file someone else owns, `logout` just removes the entry
128
+ and doesn't contact the broker.
129
+
130
+ SSH private keys are not part of the account. `pocketshell keys` keeps
131
+ them in a separate device-password vault, `key-vault.json`, in the same
132
+ directory and with the same file checks. That vault never leaves this
133
+ device. See [keys.md](keys.md).
134
+
135
+ ## Network and trust
136
+
137
+ - Only HTTPS, with TLS verification always on. Redirects aren't followed,
138
+ because they would replay the `Authorization` header somewhere else. Every
139
+ request has a timeout, and response bodies are capped at 64 KiB.
140
+ - Environment proxies and CA overrides are ignored for every request that
141
+ carries a token (the session token here, the gateway JWT in
142
+ `pocketshell gateway`): `HTTPS_PROXY`, `HTTP_PROXY`, `ALL_PROXY` (either
143
+ case) and `NO_PROXY` have no effect, and the trust store is the platform's
144
+ compiled-in default CA file/directory, not `SSL_CERT_FILE`/`SSL_CERT_DIR`.
145
+ If your network needs a proxy or a private CA to reach the broker, these
146
+ commands won't work there. If no CA bundle exists at the default location
147
+ (e.g. a python.org macOS build without "Install Certificates"), TLS
148
+ verification fails rather than falling back to the environment.
149
+ - Beyond those variables and `POCKETSHELL_BROKER_URL` (see above), the
150
+ process environment is trusted. An `.envrc` or profile that can set
151
+ `PYTHONPATH`, `LD_PRELOAD` and the like can run code inside the CLI
152
+ process, which no CLI can defend against.
153
+ - Responses must be strict JSON objects: valid UTF-8, no duplicate keys, no
154
+ NaN or Infinity. Every field the CLI uses is type-checked.
155
+ - Requests never carry an `Origin` header (the broker refuses
156
+ browser-originated calls to the CLI endpoints).
157
+ - Tokens and the device code go only in the `Authorization` header or the JSON
158
+ body. They never appear in a URL, argv, a child process's environment, logs,
159
+ exception messages, or a `repr`.
160
+ - Anything the server sends that the CLI prints (user code, email, label,
161
+ error codes) has control, escape and invisible format characters removed
162
+ first.
163
+ - `login` prints or opens a verification URL only when it is plain `https://`
164
+ on the trusted approval origin, `https://app.pocketshell.io`. If the broker
165
+ sends any other URL, `login` doesn't show or open it. It prints a warning,
166
+ shows `https://app.pocketshell.io/device` and the code instead, and keeps
167
+ waiting. A broker, including one an `.envrc` points to, can't send you to a
168
+ look-alike approval page.
169
+ - The pre-filled link (`verification_uri_complete`) is printed or opened only
170
+ when it is exactly `<verification_uri>?code=<the printed code>`. Otherwise
171
+ `login` prints the plain verification URL and the code, so a broker can't
172
+ pre-fill a different code on the trusted page than the one your terminal
173
+ shows. The page also makes you type the code's last 4 characters, so
174
+ approving always means comparing it with the terminal.
175
+ - The gateway token from `/cli/gateway/token` must look like a JWT (three
176
+ base64url segments with a JSON header). Its `expires_at` must fall within
177
+ 300 seconds plus 5 minutes of clock skew from now.
178
+
179
+ ## Configuration
180
+
181
+ | Variable | Meaning |
182
+ | --- | --- |
183
+ | `POCKETSHELL_BROKER_URL` | Broker base URL for `login` (default: the production broker). Must be `https://` with no credentials, query or fragment. An existing session always uses the broker stored with it, and the command refuses to run when this variable names a different one. |
184
+ | `POCKETSHELL_DEV_WEB_ORIGIN` | Staging and development only: the trusted approval origin, as a bare `https://host[:port]`. It's honored only when `POCKETSHELL_BROKER_URL` is also set. |
185
+ | `POCKETSHELL_BROKER_INSECURE_DEV=1` | Development and tests only: also allows `http://` when the host is loopback (`127.0.0.0/8`, `::1`, `localhost`). |
186
+
187
+ ## Exit codes
188
+
189
+ | Code | Meaning |
190
+ | --- | --- |
191
+ | 0 | Success. `logout` also exits 0 when you weren't logged in. |
192
+ | 1 | Error, or not logged in. The message goes to stderr as `error: ...`. |
193
+ | 130 | `login` was cancelled with Ctrl+C. |
@@ -0,0 +1,167 @@
1
+ # PocketShell package architecture
2
+
3
+ PocketShell is a host-side CLI. The source tree is organized around the
4
+ feature boundary exposed to the client, not around the historical order in
5
+ which individual issues added files.
6
+
7
+ ## Target tree
8
+
9
+ ```text
10
+ src/pocketshell/
11
+ ├── __main__.py # python -m pocketshell
12
+ ├── cli.py # root Click composition and daemon lifecycle
13
+ ├── github.py # one-file `github status` integration
14
+ ├── serve.py # one-file foreground HTTP integration
15
+ ├── agents/ # agent domain
16
+ │ ├── kind.py # `pocketshell agents kind`
17
+ │ ├── conversations/ # conversation-log discovery and handoff
18
+ │ │ ├── cli.py # `pocketshell agent-log`
19
+ │ │ ├── handoff.py # compact cross-agent handoff export
20
+ │ │ ├── messages.py # conversation message extraction
21
+ │ │ ├── readers.py # bounded JSONL reads
22
+ │ │ ├── resolve.py # provider log resolution
23
+ │ │ └── roots.py # provider storage roots
24
+ │ └── launch/ # launch application and execution support
25
+ │ ├── cli.py # `pocketshell agent`
26
+ │ ├── command.py # argv construction
27
+ │ ├── environment.py # launch environment policy
28
+ │ ├── run.py # process execution
29
+ │ ├── spec.py # aplexer launch specs
30
+ │ └── trust.py # provider trust preparation
31
+ ├── cards/ # typed agent→app cards
32
+ │ ├── types/ # registry and concrete card behaviors
33
+ │ │ ├── registry.py
34
+ │ │ ├── checklist.py
35
+ │ │ └── note.py
36
+ │ └── push.py # card FCM notification adapter
37
+ ├── daemon/ # Unix-socket JSON-RPC server/client
38
+ ├── engines/ # engine registry and harness probes
39
+ ├── env/ # .env/.envrc parsing and persistence
40
+ ├── hooks/ # agent hook installation and event handlers
41
+ │ └── providers/ # provider-specific configuration formats
42
+ │ ├── claude.py
43
+ │ └── codex.py
44
+ ├── logs/ # normalized host-side event log
45
+ ├── profiles/ # aplexer profile discovery/resolution
46
+ ├── attachments/ # uploaded attachment domain
47
+ │ ├── cli.py # `pocketshell prune-attachments`
48
+ │ └── prune.py # TTL and size-cap policy
49
+ ├── push/ # FCM transport and usage-reset pushes
50
+ ├── repos/ # local/remote repository discovery
51
+ ├── runtime/ # shared host-runtime primitives
52
+ │ ├── aplexer.py # bundled `a` backend adapter
53
+ │ ├── console_scripts.py # interpreter-anchored console-script dirs
54
+ │ ├── cgroups.py # cgroup/proc agent classifier
55
+ │ ├── memcap.py # session memory-cap policy
56
+ │ └── sessions.py # live-session wire model and probing
57
+ ├── sessions/ # aplexer session lifecycle commands
58
+ ├── tree/ # durable tree/workspace registry
59
+ │ ├── workspaces/ # workspace membership subdomain
60
+ │ │ ├── membership.py # durable workspace records
61
+ │ │ └── cli.py # `pocketshell workspaces`
62
+ │ └── ... # tree registry and reconciliation
63
+ └── usage/ # the complete usage boundary
64
+ ├── cli.py # live/cache/reset-events command modes
65
+ ├── quse.py # thin process boundary to quse
66
+ ├── capture/ # cache, history, durability, quarantine
67
+ └── reset/ # reset detection and event persistence
68
+ ```
69
+
70
+ The remaining root modules are deliberately small integrations shared by more
71
+ than one feature package. A new multi-file feature belongs in a package; a
72
+ single-file external-tool adapter does not need a package solely to gain an
73
+ `__init__.py`.
74
+
75
+ ## Ownership rules
76
+
77
+ - `cli.py` only composes public command objects and owns daemon lifecycle
78
+ callbacks. Feature behavior stays in the feature package.
79
+ - A feature package's `__init__.py` is its public compatibility surface. Code
80
+ inside the package imports implementation modules directly to avoid circular
81
+ imports through the public surface.
82
+ - `runtime` owns host primitives shared by unrelated feature packages:
83
+ aplexer resolution, cgroup/proc classification, memory-cap policy, and live
84
+ session enumeration. It has no eager feature-package imports.
85
+ - `sessions` owns aplexer lifecycle commands and delegates shared policy and
86
+ enumeration to `runtime`.
87
+ - `agents` owns three related but separate domains: launch preparation and
88
+ execution under `launch/`, conversation discovery and handoff under
89
+ `conversations/`, and live process-kind detection in `kind.py`. The plural
90
+ `agents` command and singular `agent` command remain separate Click
91
+ commands.
92
+ - `attachments` owns the uploaded-attachment domain. `cli.py` is only the
93
+ command surface; `prune.py` contains the deletion policy and filesystem
94
+ sweep.
95
+ - `tree` owns the registry and reconciliation. Workspace membership is a
96
+ nested subdomain under `tree/workspaces/`; live session enumeration is
97
+ imported from `runtime`, never duplicated in the tree store.
98
+ - `cards` owns card persistence and delivery. Concrete card behavior and its
99
+ registry live under `cards/types/`, while FCM notification construction
100
+ remains in `cards/push.py`; `push` owns usage-reset transport.
101
+ - `hooks/providers` owns provider-specific configuration formats; installation
102
+ orchestration and generated handlers remain in the parent `hooks` package.
103
+ - `usage` owns PocketShell-specific persistence and client integration:
104
+ capture history, reset-event detection, daemon caching, and push hooks.
105
+ Provider collection, provider schemas, and provider-specific formatting
106
+ belong to `quse`; PocketShell should not reimplement them.
107
+
108
+ ## Dependency direction
109
+
110
+ ```text
111
+ root CLI
112
+ └── feature public surfaces
113
+ ├── feature implementation modules
114
+ ├── shared host adapters (runtime, daemon, filesystem stores)
115
+ └── external providers (quse, gh, FCM)
116
+ ```
117
+
118
+ Implementation modules may depend downward on shared adapters, but shared
119
+ adapters must not import Click command registration. Persistence code should
120
+ be reusable by both a CLI command and a daemon handler. The daemon method
121
+ table is an application-composition boundary and may import feature handlers;
122
+ transport and protocol modules underneath it must stay reusable. Usage and
123
+ push intentionally share capture paths and reset-event records, so that
124
+ cross-domain dependency is documented rather than hidden behind re-exports.
125
+ Tests should patch the module that owns the symbol being exercised rather than
126
+ a re-exporting package.
127
+
128
+ ## Usage boundary with quse
129
+
130
+ `quse` is the provider backend: it discovers credentials, calls provider APIs,
131
+ normalizes provider records, and formats provider-owned output. PocketShell is
132
+ the host integration: it optionally proxies through its daemon, converts
133
+ successful live readings into the client wire format, persists captures,
134
+ detects resets across captures, and sends best-effort notifications.
135
+
136
+ When a transformation is provider/schema logic, it should be implemented and
137
+ tested in `quse`; when it is PocketShell state or client transport logic, it
138
+ stays in `pocketshell.usage`.
139
+
140
+ ## Aplexer boundary
141
+
142
+ The checked-out aplexer implementation is the source of truth for the
143
+ session runtime and for agent launch resolution. PocketShell must consume that
144
+ authority rather than grow a parallel implementation.
145
+
146
+ | Aplexer owns | PocketShell keeps |
147
+ | --- | --- |
148
+ | Engine/profile configuration and discovery (`a engines`, `a profiles`) | Picker-facing labels, usage-provider metadata, host availability probes, and the optional PocketShell presentation/config layer in `engines/` and `profiles/` |
149
+ | Launch argv, profile environment, provider-key removal, cwd, and skip-permission arguments (`a launch-spec`) | Folder `.env`/`.envrc` exports, explicit profile-to-directory UX, Claude trust seeding, binary preflight, and the thin `launch-spec` adapter |
150
+ | Session creation/claiming, worker and workload lifecycle, PTY/history/cgroup containment, `start`, `snapshot`, `status`, `attach`, `kill`, and `forget` | Schema-3 rows, display-name/target resolution, idempotent create policy, memory-cap policy, attach chrome suppression, JSON envelopes, and client-facing recovery diagnostics |
151
+ | Query-time agent/profile detection for a recorded session | `agents.kind_for_panes`, which classifies arbitrary pane PIDs and therefore has a different input and client contract |
152
+
153
+ The `runtime/aplexer.py` module is only the bundled-binary integrity and
154
+ subprocess boundary. `runtime/sessions.py` is only a client-wire model and
155
+ normalizer. Neither is a second session backend.
156
+
157
+ The old host-side launch metadata hooks were removed because they were no-op
158
+ compatibility shims after aplexer became the owner of session metadata. The
159
+ old host-side dead-record reaper was removed for the same reason: `a start`
160
+ owns workspace/tag reclamation, while `a kill` reports whether its own final
161
+ record removal succeeded. PocketShell does not issue a second `forget --force`
162
+ or inspect workload PIDs to reproduce those lifecycle decisions. The
163
+ remaining native engine/profile launch code is intentionally fallback and
164
+ presentation code for custom PocketShell configuration and hosts where the
165
+ `a` launcher probe is disabled; it is not authoritative on the normal Linux
166
+ path. Any future removal of that fallback must first migrate those custom
167
+ configuration fields into aplexer.