pocketshell 0.5.10__tar.gz → 0.5.11__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 (434) hide show
  1. {pocketshell-0.5.10 → pocketshell-0.5.11}/PKG-INFO +1 -1
  2. {pocketshell-0.5.10 → pocketshell-0.5.11}/docs/windows-tray-installer.md +32 -6
  3. {pocketshell-0.5.10 → pocketshell-0.5.11}/pyproject.toml +1 -1
  4. {pocketshell-0.5.10 → pocketshell-0.5.11}/scripts/release/build_tray_installer.py +40 -18
  5. pocketshell-0.5.11/scripts/release/psc-install.ps1 +283 -0
  6. {pocketshell-0.5.10 → pocketshell-0.5.11}/scripts/release/tray-installer.nsi +8 -0
  7. {pocketshell-0.5.10 → pocketshell-0.5.11}/tests/release/test_tray_installer.py +71 -8
  8. pocketshell-0.5.11/tests/release/test_windows_psc_install_native.py +191 -0
  9. pocketshell-0.5.11/tests/release/test_windows_psc_upgrade_native.py +127 -0
  10. {pocketshell-0.5.10 → pocketshell-0.5.11}/uv.lock +1 -1
  11. {pocketshell-0.5.10 → pocketshell-0.5.11}/.gitattributes +0 -0
  12. {pocketshell-0.5.10 → pocketshell-0.5.11}/.gitignore +0 -0
  13. {pocketshell-0.5.10 → pocketshell-0.5.11}/LICENSE +0 -0
  14. {pocketshell-0.5.10 → pocketshell-0.5.11}/README.md +0 -0
  15. {pocketshell-0.5.10 → pocketshell-0.5.11}/docs/account.md +0 -0
  16. {pocketshell-0.5.10 → pocketshell-0.5.11}/docs/architecture.md +0 -0
  17. {pocketshell-0.5.10 → pocketshell-0.5.11}/docs/gateway-distribution.md +0 -0
  18. {pocketshell-0.5.10 → pocketshell-0.5.11}/docs/gateway.md +0 -0
  19. {pocketshell-0.5.10 → pocketshell-0.5.11}/docs/keys.md +0 -0
  20. {pocketshell-0.5.10 → pocketshell-0.5.11}/docs/link-transport.md +0 -0
  21. {pocketshell-0.5.10 → pocketshell-0.5.11}/docs/tray.md +0 -0
  22. {pocketshell-0.5.10 → pocketshell-0.5.11}/docs/windows-gateway-client.md +0 -0
  23. {pocketshell-0.5.10 → pocketshell-0.5.11}/docs/windows-gateway-private-runtime.md +0 -0
  24. {pocketshell-0.5.10 → pocketshell-0.5.11}/native/launcher/go.mod +0 -0
  25. {pocketshell-0.5.10 → pocketshell-0.5.11}/native/launcher/main.go +0 -0
  26. {pocketshell-0.5.10 → pocketshell-0.5.11}/native/verify/context.go +0 -0
  27. {pocketshell-0.5.10 → pocketshell-0.5.11}/native/verify/context_test.go +0 -0
  28. {pocketshell-0.5.10 → pocketshell-0.5.11}/native/verify/context_windows.go +0 -0
  29. {pocketshell-0.5.10 → pocketshell-0.5.11}/native/verify/entry.go +0 -0
  30. {pocketshell-0.5.10 → pocketshell-0.5.11}/native/verify/go.mod +0 -0
  31. {pocketshell-0.5.10 → pocketshell-0.5.11}/native/verify/go.sum +0 -0
  32. {pocketshell-0.5.10 → pocketshell-0.5.11}/native/verify/main.go +0 -0
  33. {pocketshell-0.5.10 → pocketshell-0.5.11}/native/verify/protocol.go +0 -0
  34. {pocketshell-0.5.10 → pocketshell-0.5.11}/native/verify/protocol_test.go +0 -0
  35. {pocketshell-0.5.10 → pocketshell-0.5.11}/native/verify/spawn_test.go +0 -0
  36. {pocketshell-0.5.10 → pocketshell-0.5.11}/native/verify/spawn_windows.go +0 -0
  37. {pocketshell-0.5.10 → pocketshell-0.5.11}/native/verify/verify_other.go +0 -0
  38. {pocketshell-0.5.10 → pocketshell-0.5.11}/native/verify/verify_windows.go +0 -0
  39. {pocketshell-0.5.10 → pocketshell-0.5.11}/pocketshell-tray.spec +0 -0
  40. {pocketshell-0.5.10 → pocketshell-0.5.11}/release/inputs/aplexer-fc396/README.md +0 -0
  41. {pocketshell-0.5.10 → pocketshell-0.5.11}/release/inputs/aplexer-fc396/SHA256SUMS +0 -0
  42. {pocketshell-0.5.10 → pocketshell-0.5.11}/release/inputs/aplexer-fc396/windows-native-fc396.zip +0 -0
  43. {pocketshell-0.5.10 → pocketshell-0.5.11}/release/inputs/dossiers/OWNED-BUILD-V26A.json +0 -0
  44. {pocketshell-0.5.10 → pocketshell-0.5.11}/release/inputs/dossiers/SHA256SUMS +0 -0
  45. {pocketshell-0.5.10 → pocketshell-0.5.11}/release/inputs/dossiers/quiet-build-terminal-fields-addendum.json +0 -0
  46. {pocketshell-0.5.10 → pocketshell-0.5.11}/release/inputs/dossiers/quiet-host-source-build-role-handoff.json +0 -0
  47. {pocketshell-0.5.10 → pocketshell-0.5.11}/release/inputs/dossiers/transfer-manifest.json +0 -0
  48. {pocketshell-0.5.10 → pocketshell-0.5.11}/release/inputs/dossiers/windows-aplexer-msys-backend-source-role-handoff.json +0 -0
  49. {pocketshell-0.5.10 → pocketshell-0.5.11}/release/inputs/guardian-6cf7ae85/.gitattributes +0 -0
  50. {pocketshell-0.5.10 → pocketshell-0.5.11}/release/inputs/guardian-6cf7ae85/README.md +0 -0
  51. {pocketshell-0.5.10 → pocketshell-0.5.11}/release/inputs/guardian-6cf7ae85/SHA256SUMS +0 -0
  52. {pocketshell-0.5.10 → pocketshell-0.5.11}/release/inputs/guardian-6cf7ae85/guardian.py +0 -0
  53. {pocketshell-0.5.10 → pocketshell-0.5.11}/release/inputs/guardian-6cf7ae85/native_api.py +0 -0
  54. {pocketshell-0.5.10 → pocketshell-0.5.11}/release/inputs/guardian-6cf7ae85/policy.py +0 -0
  55. {pocketshell-0.5.10 → pocketshell-0.5.11}/release/inputs/guardian-e862645d/DERIVATION.diff +0 -0
  56. {pocketshell-0.5.10 → pocketshell-0.5.11}/release/inputs/guardian-e862645d/README.md +0 -0
  57. {pocketshell-0.5.10 → pocketshell-0.5.11}/release/inputs/guardian-e862645d/SHA256SUMS +0 -0
  58. {pocketshell-0.5.10 → pocketshell-0.5.11}/release/inputs/guardian-e862645d/guardian.py +0 -0
  59. {pocketshell-0.5.10 → pocketshell-0.5.11}/release/inputs/guardian-e862645d/native_api.py +0 -0
  60. {pocketshell-0.5.10 → pocketshell-0.5.11}/release/inputs/guardian-e862645d/policy.py +0 -0
  61. {pocketshell-0.5.10 → pocketshell-0.5.11}/release/inputs/guardian-servicing/README.md +0 -0
  62. {pocketshell-0.5.10 → pocketshell-0.5.11}/release/inputs/guardian-servicing/SHA256SUMS +0 -0
  63. {pocketshell-0.5.10 → pocketshell-0.5.11}/release/inputs/guardian-servicing/guardian.py +0 -0
  64. {pocketshell-0.5.10 → pocketshell-0.5.11}/release/inputs/guardian-servicing/native_api.py +0 -0
  65. {pocketshell-0.5.10 → pocketshell-0.5.11}/release/inputs/guardian-servicing/policy.py +0 -0
  66. {pocketshell-0.5.10 → pocketshell-0.5.11}/release/inputs/msys2-runtime-5a1665c8/SHA256SUMS +0 -0
  67. {pocketshell-0.5.10 → pocketshell-0.5.11}/release/inputs/msys2-runtime-5a1665c8/console.cc +0 -0
  68. {pocketshell-0.5.10 → pocketshell-0.5.11}/release/inputs/openssh-quiet-e302fe1/NULL-PATH-FIX.md +0 -0
  69. {pocketshell-0.5.10 → pocketshell-0.5.11}/release/inputs/openssh-quiet-e302fe1/SHA256SUMS +0 -0
  70. {pocketshell-0.5.10 → pocketshell-0.5.11}/release/inputs/openssh-quiet-e302fe1/policy-manifest.json +0 -0
  71. {pocketshell-0.5.10 → pocketshell-0.5.11}/release/inputs/openssh-quiet-e302fe1/shell-host.c +0 -0
  72. {pocketshell-0.5.10 → pocketshell-0.5.11}/release/inputs/openssh-quiet-e302fe1/w32fd.c +0 -0
  73. {pocketshell-0.5.10 → pocketshell-0.5.11}/release/inputs/openssh-quiet-e302fe1/wmain_sshd-auth.c +0 -0
  74. {pocketshell-0.5.10 → pocketshell-0.5.11}/release/inputs/openssh-quiet-e302fe1/wmain_sshd-session.c +0 -0
  75. {pocketshell-0.5.10 → pocketshell-0.5.11}/release/inputs/openssh-quiet-e302fe1/wmain_sshd.c +0 -0
  76. {pocketshell-0.5.10 → pocketshell-0.5.11}/release/inputs/pocketshell-link-70f5a4b/README.md +0 -0
  77. {pocketshell-0.5.10 → pocketshell-0.5.11}/release/inputs/pocketshell-link-70f5a4b/SHA256SUMS +0 -0
  78. {pocketshell-0.5.10 → pocketshell-0.5.11}/release/inputs/pocketshell-link-70f5a4b/pocketshell-link-windows-amd64.exe +0 -0
  79. {pocketshell-0.5.10 → pocketshell-0.5.11}/scheduler/README.md +0 -0
  80. {pocketshell-0.5.10 → pocketshell-0.5.11}/scheduler/pocketshell-usage-capture.service +0 -0
  81. {pocketshell-0.5.10 → pocketshell-0.5.11}/scheduler/pocketshell-usage-capture.timer +0 -0
  82. {pocketshell-0.5.10 → pocketshell-0.5.11}/scripts/check-antigravity-contract.py +0 -0
  83. {pocketshell-0.5.10 → pocketshell-0.5.11}/scripts/check-cgroup-cap-proof.sh +0 -0
  84. {pocketshell-0.5.10 → pocketshell-0.5.11}/scripts/check-product-tmux-absent.sh +0 -0
  85. {pocketshell-0.5.10 → pocketshell-0.5.11}/scripts/check-python-ci-lock.sh +0 -0
  86. {pocketshell-0.5.10 → pocketshell-0.5.11}/scripts/reinstall-box-cli.sh +0 -0
  87. {pocketshell-0.5.10 → pocketshell-0.5.11}/scripts/release/build_backend_windows.py +0 -0
  88. {pocketshell-0.5.10 → pocketshell-0.5.11}/scripts/release/build_closure.py +0 -0
  89. {pocketshell-0.5.10 → pocketshell-0.5.11}/scripts/release/private_shell_overlay.py +0 -0
  90. {pocketshell-0.5.10 → pocketshell-0.5.11}/scripts/release/smoke_tray_bundle.py +0 -0
  91. {pocketshell-0.5.10 → pocketshell-0.5.11}/scripts/sync-readme-exit-codes.py +0 -0
  92. {pocketshell-0.5.10 → pocketshell-0.5.11}/scripts/test-usage-missing-window-mutation.sh +0 -0
  93. {pocketshell-0.5.10 → pocketshell-0.5.11}/scripts/windows-e2e-sshd-setup.ps1 +0 -0
  94. {pocketshell-0.5.10 → pocketshell-0.5.11}/scripts/windows-gateway-qualify.py +0 -0
  95. {pocketshell-0.5.10 → pocketshell-0.5.11}/src/pocketshell/__init__.py +0 -0
  96. {pocketshell-0.5.10 → pocketshell-0.5.11}/src/pocketshell/__main__.py +0 -0
  97. {pocketshell-0.5.10 → pocketshell-0.5.11}/src/pocketshell/account/__init__.py +0 -0
  98. {pocketshell-0.5.10 → pocketshell-0.5.11}/src/pocketshell/account/broker.py +0 -0
  99. {pocketshell-0.5.10 → pocketshell-0.5.11}/src/pocketshell/account/cli.py +0 -0
  100. {pocketshell-0.5.10 → pocketshell-0.5.11}/src/pocketshell/account/config.py +0 -0
  101. {pocketshell-0.5.10 → pocketshell-0.5.11}/src/pocketshell/account/credentials.py +0 -0
  102. {pocketshell-0.5.10 → pocketshell-0.5.11}/src/pocketshell/account/device.py +0 -0
  103. {pocketshell-0.5.10 → pocketshell-0.5.11}/src/pocketshell/account/errors.py +0 -0
  104. {pocketshell-0.5.10 → pocketshell-0.5.11}/src/pocketshell/account/jsonutil.py +0 -0
  105. {pocketshell-0.5.10 → pocketshell-0.5.11}/src/pocketshell/account/sanitize.py +0 -0
  106. {pocketshell-0.5.10 → pocketshell-0.5.11}/src/pocketshell/agents/__init__.py +0 -0
  107. {pocketshell-0.5.10 → pocketshell-0.5.11}/src/pocketshell/agents/conversations/__init__.py +0 -0
  108. {pocketshell-0.5.10 → pocketshell-0.5.11}/src/pocketshell/agents/conversations/cli.py +0 -0
  109. {pocketshell-0.5.10 → pocketshell-0.5.11}/src/pocketshell/agents/conversations/handoff.py +0 -0
  110. {pocketshell-0.5.10 → pocketshell-0.5.11}/src/pocketshell/agents/conversations/messages.py +0 -0
  111. {pocketshell-0.5.10 → pocketshell-0.5.11}/src/pocketshell/agents/conversations/readers.py +0 -0
  112. {pocketshell-0.5.10 → pocketshell-0.5.11}/src/pocketshell/agents/conversations/resolve.py +0 -0
  113. {pocketshell-0.5.10 → pocketshell-0.5.11}/src/pocketshell/agents/conversations/roots.py +0 -0
  114. {pocketshell-0.5.10 → pocketshell-0.5.11}/src/pocketshell/agents/kind.py +0 -0
  115. {pocketshell-0.5.10 → pocketshell-0.5.11}/src/pocketshell/agents/launch/__init__.py +0 -0
  116. {pocketshell-0.5.10 → pocketshell-0.5.11}/src/pocketshell/agents/launch/cli.py +0 -0
  117. {pocketshell-0.5.10 → pocketshell-0.5.11}/src/pocketshell/agents/launch/command.py +0 -0
  118. {pocketshell-0.5.10 → pocketshell-0.5.11}/src/pocketshell/agents/launch/environment.py +0 -0
  119. {pocketshell-0.5.10 → pocketshell-0.5.11}/src/pocketshell/agents/launch/run.py +0 -0
  120. {pocketshell-0.5.10 → pocketshell-0.5.11}/src/pocketshell/agents/launch/spec.py +0 -0
  121. {pocketshell-0.5.10 → pocketshell-0.5.11}/src/pocketshell/agents/launch/trust.py +0 -0
  122. {pocketshell-0.5.10 → pocketshell-0.5.11}/src/pocketshell/attachments/__init__.py +0 -0
  123. {pocketshell-0.5.10 → pocketshell-0.5.11}/src/pocketshell/attachments/cli.py +0 -0
  124. {pocketshell-0.5.10 → pocketshell-0.5.11}/src/pocketshell/attachments/prune.py +0 -0
  125. {pocketshell-0.5.10 → pocketshell-0.5.11}/src/pocketshell/cards/__init__.py +0 -0
  126. {pocketshell-0.5.10 → pocketshell-0.5.11}/src/pocketshell/cards/cli.py +0 -0
  127. {pocketshell-0.5.10 → pocketshell-0.5.11}/src/pocketshell/cards/paths.py +0 -0
  128. {pocketshell-0.5.10 → pocketshell-0.5.11}/src/pocketshell/cards/push.py +0 -0
  129. {pocketshell-0.5.10 → pocketshell-0.5.11}/src/pocketshell/cards/store.py +0 -0
  130. {pocketshell-0.5.10 → pocketshell-0.5.11}/src/pocketshell/cards/types/__init__.py +0 -0
  131. {pocketshell-0.5.10 → pocketshell-0.5.11}/src/pocketshell/cards/types/checklist.py +0 -0
  132. {pocketshell-0.5.10 → pocketshell-0.5.11}/src/pocketshell/cards/types/note.py +0 -0
  133. {pocketshell-0.5.10 → pocketshell-0.5.11}/src/pocketshell/cards/types/registry.py +0 -0
  134. {pocketshell-0.5.10 → pocketshell-0.5.11}/src/pocketshell/cli.py +0 -0
  135. {pocketshell-0.5.10 → pocketshell-0.5.11}/src/pocketshell/daemon/__init__.py +0 -0
  136. {pocketshell-0.5.10 → pocketshell-0.5.11}/src/pocketshell/daemon/cache.py +0 -0
  137. {pocketshell-0.5.10 → pocketshell-0.5.11}/src/pocketshell/daemon/client.py +0 -0
  138. {pocketshell-0.5.10 → pocketshell-0.5.11}/src/pocketshell/daemon/dispatch.py +0 -0
  139. {pocketshell-0.5.10 → pocketshell-0.5.11}/src/pocketshell/daemon/failures.py +0 -0
  140. {pocketshell-0.5.10 → pocketshell-0.5.11}/src/pocketshell/daemon/lifecycle.py +0 -0
  141. {pocketshell-0.5.10 → pocketshell-0.5.11}/src/pocketshell/daemon/methods.py +0 -0
  142. {pocketshell-0.5.10 → pocketshell-0.5.11}/src/pocketshell/daemon/paths.py +0 -0
  143. {pocketshell-0.5.10 → pocketshell-0.5.11}/src/pocketshell/daemon/protocol.py +0 -0
  144. {pocketshell-0.5.10 → pocketshell-0.5.11}/src/pocketshell/daemon/server.py +0 -0
  145. {pocketshell-0.5.10 → pocketshell-0.5.11}/src/pocketshell/engines/__init__.py +0 -0
  146. {pocketshell-0.5.10 → pocketshell-0.5.11}/src/pocketshell/engines/builtin.py +0 -0
  147. {pocketshell-0.5.10 → pocketshell-0.5.11}/src/pocketshell/engines/cli.py +0 -0
  148. {pocketshell-0.5.10 → pocketshell-0.5.11}/src/pocketshell/engines/harness.py +0 -0
  149. {pocketshell-0.5.10 → pocketshell-0.5.11}/src/pocketshell/engines/registry.py +0 -0
  150. {pocketshell-0.5.10 → pocketshell-0.5.11}/src/pocketshell/engines/spec.py +0 -0
  151. {pocketshell-0.5.10 → pocketshell-0.5.11}/src/pocketshell/env/__init__.py +0 -0
  152. {pocketshell-0.5.10 → pocketshell-0.5.11}/src/pocketshell/env/cli.py +0 -0
  153. {pocketshell-0.5.10 → pocketshell-0.5.11}/src/pocketshell/env/parse.py +0 -0
  154. {pocketshell-0.5.10 → pocketshell-0.5.11}/src/pocketshell/env/store.py +0 -0
  155. {pocketshell-0.5.10 → pocketshell-0.5.11}/src/pocketshell/gateway/__init__.py +0 -0
  156. {pocketshell-0.5.10 → pocketshell-0.5.11}/src/pocketshell/gateway/cli.py +0 -0
  157. {pocketshell-0.5.10 → pocketshell-0.5.11}/src/pocketshell/gateway/client_cli.py +0 -0
  158. {pocketshell-0.5.10 → pocketshell-0.5.11}/src/pocketshell/gateway/devices.py +0 -0
  159. {pocketshell-0.5.10 → pocketshell-0.5.11}/src/pocketshell/gateway/endpoint.py +0 -0
  160. {pocketshell-0.5.10 → pocketshell-0.5.11}/src/pocketshell/gateway/helper.py +0 -0
  161. {pocketshell-0.5.10 → pocketshell-0.5.11}/src/pocketshell/gateway/pins.py +0 -0
  162. {pocketshell-0.5.10 → pocketshell-0.5.11}/src/pocketshell/gateway/private_endpoint.py +0 -0
  163. {pocketshell-0.5.10 → pocketshell-0.5.11}/src/pocketshell/gateway/proxy.py +0 -0
  164. {pocketshell-0.5.10 → pocketshell-0.5.11}/src/pocketshell/gateway/service.py +0 -0
  165. {pocketshell-0.5.10 → pocketshell-0.5.11}/src/pocketshell/gateway/service_agent_endpoint.py +0 -0
  166. {pocketshell-0.5.10 → pocketshell-0.5.11}/src/pocketshell/gateway/service_agent_firstuse.py +0 -0
  167. {pocketshell-0.5.10 → pocketshell-0.5.11}/src/pocketshell/gateway/service_agent_install.py +0 -0
  168. {pocketshell-0.5.10 → pocketshell-0.5.11}/src/pocketshell/gateway/service_common.py +0 -0
  169. {pocketshell-0.5.10 → pocketshell-0.5.11}/src/pocketshell/gateway/service_endpoint.py +0 -0
  170. {pocketshell-0.5.10 → pocketshell-0.5.11}/src/pocketshell/gateway/service_hostkey.py +0 -0
  171. {pocketshell-0.5.10 → pocketshell-0.5.11}/src/pocketshell/gateway/service_linux.py +0 -0
  172. {pocketshell-0.5.10 → pocketshell-0.5.11}/src/pocketshell/gateway/service_task_acl.py +0 -0
  173. {pocketshell-0.5.10 → pocketshell-0.5.11}/src/pocketshell/gateway/service_user_agent.py +0 -0
  174. {pocketshell-0.5.10 → pocketshell-0.5.11}/src/pocketshell/gateway/service_windows.py +0 -0
  175. {pocketshell-0.5.10 → pocketshell-0.5.11}/src/pocketshell/gateway/service_windows_endpoint.py +0 -0
  176. {pocketshell-0.5.10 → pocketshell-0.5.11}/src/pocketshell/gateway/sshcmd.py +0 -0
  177. {pocketshell-0.5.10 → pocketshell-0.5.11}/src/pocketshell/gateway/status.py +0 -0
  178. {pocketshell-0.5.10 → pocketshell-0.5.11}/src/pocketshell/gateway/tokens.py +0 -0
  179. {pocketshell-0.5.10 → pocketshell-0.5.11}/src/pocketshell/gateway/winssh.py +0 -0
  180. {pocketshell-0.5.10 → pocketshell-0.5.11}/src/pocketshell/github.py +0 -0
  181. {pocketshell-0.5.10 → pocketshell-0.5.11}/src/pocketshell/hooks/__init__.py +0 -0
  182. {pocketshell-0.5.10 → pocketshell-0.5.11}/src/pocketshell/hooks/cli.py +0 -0
  183. {pocketshell-0.5.10 → pocketshell-0.5.11}/src/pocketshell/hooks/handlers.py +0 -0
  184. {pocketshell-0.5.10 → pocketshell-0.5.11}/src/pocketshell/hooks/installers.py +0 -0
  185. {pocketshell-0.5.10 → pocketshell-0.5.11}/src/pocketshell/hooks/paths.py +0 -0
  186. {pocketshell-0.5.10 → pocketshell-0.5.11}/src/pocketshell/hooks/providers/__init__.py +0 -0
  187. {pocketshell-0.5.10 → pocketshell-0.5.11}/src/pocketshell/hooks/providers/claude.py +0 -0
  188. {pocketshell-0.5.10 → pocketshell-0.5.11}/src/pocketshell/hooks/providers/codex.py +0 -0
  189. {pocketshell-0.5.10 → pocketshell-0.5.11}/src/pocketshell/hooks/status.py +0 -0
  190. {pocketshell-0.5.10 → pocketshell-0.5.11}/src/pocketshell/keys/__init__.py +0 -0
  191. {pocketshell-0.5.10 → pocketshell-0.5.11}/src/pocketshell/keys/cli.py +0 -0
  192. {pocketshell-0.5.10 → pocketshell-0.5.11}/src/pocketshell/keys/crypto.py +0 -0
  193. {pocketshell-0.5.10 → pocketshell-0.5.11}/src/pocketshell/keys/prompt.py +0 -0
  194. {pocketshell-0.5.10 → pocketshell-0.5.11}/src/pocketshell/keys/session.py +0 -0
  195. {pocketshell-0.5.10 → pocketshell-0.5.11}/src/pocketshell/keys/sshkeys.py +0 -0
  196. {pocketshell-0.5.10 → pocketshell-0.5.11}/src/pocketshell/keys/store.py +0 -0
  197. {pocketshell-0.5.10 → pocketshell-0.5.11}/src/pocketshell/link/__init__.py +0 -0
  198. {pocketshell-0.5.10 → pocketshell-0.5.11}/src/pocketshell/link/cli.py +0 -0
  199. {pocketshell-0.5.10 → pocketshell-0.5.11}/src/pocketshell/link/client.py +0 -0
  200. {pocketshell-0.5.10 → pocketshell-0.5.11}/src/pocketshell/link/daemon.py +0 -0
  201. {pocketshell-0.5.10 → pocketshell-0.5.11}/src/pocketshell/link/protocol.py +0 -0
  202. {pocketshell-0.5.10 → pocketshell-0.5.11}/src/pocketshell/link/relay.py +0 -0
  203. {pocketshell-0.5.10 → pocketshell-0.5.11}/src/pocketshell/logs/__init__.py +0 -0
  204. {pocketshell-0.5.10 → pocketshell-0.5.11}/src/pocketshell/logs/cli.py +0 -0
  205. {pocketshell-0.5.10 → pocketshell-0.5.11}/src/pocketshell/logs/events.py +0 -0
  206. {pocketshell-0.5.10 → pocketshell-0.5.11}/src/pocketshell/logs/hooks.py +0 -0
  207. {pocketshell-0.5.10 → pocketshell-0.5.11}/src/pocketshell/logs/paths.py +0 -0
  208. {pocketshell-0.5.10 → pocketshell-0.5.11}/src/pocketshell/logs/redact.py +0 -0
  209. {pocketshell-0.5.10 → pocketshell-0.5.11}/src/pocketshell/profiles/__init__.py +0 -0
  210. {pocketshell-0.5.10 → pocketshell-0.5.11}/src/pocketshell/profiles/cli.py +0 -0
  211. {pocketshell-0.5.10 → pocketshell-0.5.11}/src/pocketshell/profiles/discovery.py +0 -0
  212. {pocketshell-0.5.10 → pocketshell-0.5.11}/src/pocketshell/profiles/model.py +0 -0
  213. {pocketshell-0.5.10 → pocketshell-0.5.11}/src/pocketshell/profiles/resolve.py +0 -0
  214. {pocketshell-0.5.10 → pocketshell-0.5.11}/src/pocketshell/push/__init__.py +0 -0
  215. {pocketshell-0.5.10 → pocketshell-0.5.11}/src/pocketshell/push/cli.py +0 -0
  216. {pocketshell-0.5.10 → pocketshell-0.5.11}/src/pocketshell/push/events.py +0 -0
  217. {pocketshell-0.5.10 → pocketshell-0.5.11}/src/pocketshell/push/fcm.py +0 -0
  218. {pocketshell-0.5.10 → pocketshell-0.5.11}/src/pocketshell/push/store.py +0 -0
  219. {pocketshell-0.5.10 → pocketshell-0.5.11}/src/pocketshell/repos/__init__.py +0 -0
  220. {pocketshell-0.5.10 → pocketshell-0.5.11}/src/pocketshell/repos/cli.py +0 -0
  221. {pocketshell-0.5.10 → pocketshell-0.5.11}/src/pocketshell/repos/handlers.py +0 -0
  222. {pocketshell-0.5.10 → pocketshell-0.5.11}/src/pocketshell/repos/local.py +0 -0
  223. {pocketshell-0.5.10 → pocketshell-0.5.11}/src/pocketshell/repos/model.py +0 -0
  224. {pocketshell-0.5.10 → pocketshell-0.5.11}/src/pocketshell/repos/remote.py +0 -0
  225. {pocketshell-0.5.10 → pocketshell-0.5.11}/src/pocketshell/repos/render.py +0 -0
  226. {pocketshell-0.5.10 → pocketshell-0.5.11}/src/pocketshell/runtime/__init__.py +0 -0
  227. {pocketshell-0.5.10 → pocketshell-0.5.11}/src/pocketshell/runtime/aplexer.py +0 -0
  228. {pocketshell-0.5.10 → pocketshell-0.5.11}/src/pocketshell/runtime/cgroups.py +0 -0
  229. {pocketshell-0.5.10 → pocketshell-0.5.11}/src/pocketshell/runtime/console_scripts.py +0 -0
  230. {pocketshell-0.5.10 → pocketshell-0.5.11}/src/pocketshell/runtime/memcap.py +0 -0
  231. {pocketshell-0.5.10 → pocketshell-0.5.11}/src/pocketshell/runtime/sessions.py +0 -0
  232. {pocketshell-0.5.10 → pocketshell-0.5.11}/src/pocketshell/serve.py +0 -0
  233. {pocketshell-0.5.10 → pocketshell-0.5.11}/src/pocketshell/sessions/__init__.py +0 -0
  234. {pocketshell-0.5.10 → pocketshell-0.5.11}/src/pocketshell/sessions/attach.py +0 -0
  235. {pocketshell-0.5.10 → pocketshell-0.5.11}/src/pocketshell/sessions/cli.py +0 -0
  236. {pocketshell-0.5.10 → pocketshell-0.5.11}/src/pocketshell/sessions/create.py +0 -0
  237. {pocketshell-0.5.10 → pocketshell-0.5.11}/src/pocketshell/sessions/kill.py +0 -0
  238. {pocketshell-0.5.10 → pocketshell-0.5.11}/src/pocketshell/sessions/listing.py +0 -0
  239. {pocketshell-0.5.10 → pocketshell-0.5.11}/src/pocketshell/sessions/rename.py +0 -0
  240. {pocketshell-0.5.10 → pocketshell-0.5.11}/src/pocketshell/sessions/warnings.py +0 -0
  241. {pocketshell-0.5.10 → pocketshell-0.5.11}/src/pocketshell/tokentls.py +0 -0
  242. {pocketshell-0.5.10 → pocketshell-0.5.11}/src/pocketshell/tray/__init__.py +0 -0
  243. {pocketshell-0.5.10 → pocketshell-0.5.11}/src/pocketshell/tray/__main__.py +0 -0
  244. {pocketshell-0.5.10 → pocketshell-0.5.11}/src/pocketshell/tray/app.py +0 -0
  245. {pocketshell-0.5.10 → pocketshell-0.5.11}/src/pocketshell/tray/autostart.py +0 -0
  246. {pocketshell-0.5.10 → pocketshell-0.5.11}/src/pocketshell/tray/cli.py +0 -0
  247. {pocketshell-0.5.10 → pocketshell-0.5.11}/src/pocketshell/tray/dialogs.py +0 -0
  248. {pocketshell-0.5.10 → pocketshell-0.5.11}/src/pocketshell/tray/gateway_auth.py +0 -0
  249. {pocketshell-0.5.10 → pocketshell-0.5.11}/src/pocketshell/tray/icons.py +0 -0
  250. {pocketshell-0.5.10 → pocketshell-0.5.11}/src/pocketshell/tray/model.py +0 -0
  251. {pocketshell-0.5.10 → pocketshell-0.5.11}/src/pocketshell/tray/single_instance.py +0 -0
  252. {pocketshell-0.5.10 → pocketshell-0.5.11}/src/pocketshell/tray/status_client.py +0 -0
  253. {pocketshell-0.5.10 → pocketshell-0.5.11}/src/pocketshell/tray_bundle.py +0 -0
  254. {pocketshell-0.5.10 → pocketshell-0.5.11}/src/pocketshell/tray_repair.py +0 -0
  255. {pocketshell-0.5.10 → pocketshell-0.5.11}/src/pocketshell/tray_supervisor.py +0 -0
  256. {pocketshell-0.5.10 → pocketshell-0.5.11}/src/pocketshell/tree/__init__.py +0 -0
  257. {pocketshell-0.5.10 → pocketshell-0.5.11}/src/pocketshell/tree/cli.py +0 -0
  258. {pocketshell-0.5.10 → pocketshell-0.5.11}/src/pocketshell/tree/daemon.py +0 -0
  259. {pocketshell-0.5.10 → pocketshell-0.5.11}/src/pocketshell/tree/model.py +0 -0
  260. {pocketshell-0.5.10 → pocketshell-0.5.11}/src/pocketshell/tree/paths.py +0 -0
  261. {pocketshell-0.5.10 → pocketshell-0.5.11}/src/pocketshell/tree/storage.py +0 -0
  262. {pocketshell-0.5.10 → pocketshell-0.5.11}/src/pocketshell/tree/workspaces/__init__.py +0 -0
  263. {pocketshell-0.5.10 → pocketshell-0.5.11}/src/pocketshell/tree/workspaces/cli.py +0 -0
  264. {pocketshell-0.5.10 → pocketshell-0.5.11}/src/pocketshell/tree/workspaces/membership.py +0 -0
  265. {pocketshell-0.5.10 → pocketshell-0.5.11}/src/pocketshell/usage/__init__.py +0 -0
  266. {pocketshell-0.5.10 → pocketshell-0.5.11}/src/pocketshell/usage/capture/__init__.py +0 -0
  267. {pocketshell-0.5.10 → pocketshell-0.5.11}/src/pocketshell/usage/capture/durability.py +0 -0
  268. {pocketshell-0.5.10 → pocketshell-0.5.11}/src/pocketshell/usage/capture/history.py +0 -0
  269. {pocketshell-0.5.10 → pocketshell-0.5.11}/src/pocketshell/usage/capture/paths.py +0 -0
  270. {pocketshell-0.5.10 → pocketshell-0.5.11}/src/pocketshell/usage/capture/quarantine.py +0 -0
  271. {pocketshell-0.5.10 → pocketshell-0.5.11}/src/pocketshell/usage/cli.py +0 -0
  272. {pocketshell-0.5.10 → pocketshell-0.5.11}/src/pocketshell/usage/normalize.py +0 -0
  273. {pocketshell-0.5.10 → pocketshell-0.5.11}/src/pocketshell/usage/quse.py +0 -0
  274. {pocketshell-0.5.10 → pocketshell-0.5.11}/src/pocketshell/usage/reset/__init__.py +0 -0
  275. {pocketshell-0.5.10 → pocketshell-0.5.11}/src/pocketshell/usage/reset/detect.py +0 -0
  276. {pocketshell-0.5.10 → pocketshell-0.5.11}/src/pocketshell/usage/reset/store.py +0 -0
  277. {pocketshell-0.5.10 → pocketshell-0.5.11}/src/pocketshell/windows_security.py +0 -0
  278. {pocketshell-0.5.10 → pocketshell-0.5.11}/src/pocketshell/windows_sessions.py +0 -0
  279. {pocketshell-0.5.10 → pocketshell-0.5.11}/tests/__init__.py +0 -0
  280. {pocketshell-0.5.10 → pocketshell-0.5.11}/tests/account/test_account_basics.py +0 -0
  281. {pocketshell-0.5.10 → pocketshell-0.5.11}/tests/account/test_account_broker.py +0 -0
  282. {pocketshell-0.5.10 → pocketshell-0.5.11}/tests/account/test_account_cli.py +0 -0
  283. {pocketshell-0.5.10 → pocketshell-0.5.11}/tests/account/test_account_credentials.py +0 -0
  284. {pocketshell-0.5.10 → pocketshell-0.5.11}/tests/account/test_account_device_flow.py +0 -0
  285. {pocketshell-0.5.10 → pocketshell-0.5.11}/tests/account/test_account_tls.py +0 -0
  286. {pocketshell-0.5.10 → pocketshell-0.5.11}/tests/account/test_windows_private_storage.py +0 -0
  287. {pocketshell-0.5.10 → pocketshell-0.5.11}/tests/conftest.py +0 -0
  288. {pocketshell-0.5.10 → pocketshell-0.5.11}/tests/data/quse-0.0.11-usage.json +0 -0
  289. {pocketshell-0.5.10 → pocketshell-0.5.11}/tests/data/quse-0.0.13-usage.json +0 -0
  290. {pocketshell-0.5.10 → pocketshell-0.5.11}/tests/data/quse-0.0.15-usage.json +0 -0
  291. {pocketshell-0.5.10 → pocketshell-0.5.11}/tests/data/quse-0.0.15-usage.ndjson +0 -0
  292. {pocketshell-0.5.10 → pocketshell-0.5.11}/tests/data/quse-0.0.15-usage.provenance.txt +0 -0
  293. {pocketshell-0.5.10 → pocketshell-0.5.11}/tests/data/quse-0.0.17-gemini.json +0 -0
  294. {pocketshell-0.5.10 → pocketshell-0.5.11}/tests/data/quse-0.0.17-gemini.provenance.txt +0 -0
  295. {pocketshell-0.5.10 → pocketshell-0.5.11}/tests/data/quse-0.0.9-usage.json +0 -0
  296. {pocketshell-0.5.10 → pocketshell-0.5.11}/tests/data/sshd_anchor/Dockerfile.from-unanchored-base +0 -0
  297. {pocketshell-0.5.10 → pocketshell-0.5.11}/tests/docker/link/e2e.sh +0 -0
  298. {pocketshell-0.5.10 → pocketshell-0.5.11}/tests/docker/link/e2e_client.py +0 -0
  299. {pocketshell-0.5.10 → pocketshell-0.5.11}/tests/docker/link/host_entry.py +0 -0
  300. {pocketshell-0.5.10 → pocketshell-0.5.11}/tests/docker/link/relay_entry.py +0 -0
  301. {pocketshell-0.5.10 → pocketshell-0.5.11}/tests/fake_broker.py +0 -0
  302. {pocketshell-0.5.10 → pocketshell-0.5.11}/tests/fixtures/aplexer/README.md +0 -0
  303. {pocketshell-0.5.10 → pocketshell-0.5.11}/tests/fixtures/aplexer/snapshot-agent.json +0 -0
  304. {pocketshell-0.5.10 → pocketshell-0.5.11}/tests/fixtures/aplexer/snapshot-crashed-start.json +0 -0
  305. {pocketshell-0.5.10 → pocketshell-0.5.11}/tests/fixtures/aplexer/snapshot-liveness-mix.json +0 -0
  306. {pocketshell-0.5.10 → pocketshell-0.5.11}/tests/fixtures/aplexer/snapshot-mid-create.json +0 -0
  307. {pocketshell-0.5.10 → pocketshell-0.5.11}/tests/fixtures/aplexer/snapshot-post-kill-window.json +0 -0
  308. {pocketshell-0.5.10 → pocketshell-0.5.11}/tests/fixtures/aplexer/snapshot-reported-state.json +0 -0
  309. {pocketshell-0.5.10 → pocketshell-0.5.11}/tests/fixtures/aplexer/snapshot.json +0 -0
  310. {pocketshell-0.5.10 → pocketshell-0.5.11}/tests/gateway/agent_harness.py +0 -0
  311. {pocketshell-0.5.10 → pocketshell-0.5.11}/tests/gateway/conftest.py +0 -0
  312. {pocketshell-0.5.10 → pocketshell-0.5.11}/tests/gateway/fake_gateway.py +0 -0
  313. {pocketshell-0.5.10 → pocketshell-0.5.11}/tests/gateway/fakeguardian/go.mod +0 -0
  314. {pocketshell-0.5.10 → pocketshell-0.5.11}/tests/gateway/fakeguardian/go.sum +0 -0
  315. {pocketshell-0.5.10 → pocketshell-0.5.11}/tests/gateway/fakeguardian/main.go +0 -0
  316. {pocketshell-0.5.10 → pocketshell-0.5.11}/tests/gateway/fakelink/main.go +0 -0
  317. {pocketshell-0.5.10 → pocketshell-0.5.11}/tests/gateway/fixtures/ordinary-v2-authority.schema.json +0 -0
  318. {pocketshell-0.5.10 → pocketshell-0.5.11}/tests/gateway/fixtures/task-object-authority.ps1 +0 -0
  319. {pocketshell-0.5.10 → pocketshell-0.5.11}/tests/gateway/gateway_keyblobs.py +0 -0
  320. {pocketshell-0.5.10 → pocketshell-0.5.11}/tests/gateway/test_bundled_hostkey.py +0 -0
  321. {pocketshell-0.5.10 → pocketshell-0.5.11}/tests/gateway/test_gateway_agent_firstuse.py +0 -0
  322. {pocketshell-0.5.10 → pocketshell-0.5.11}/tests/gateway/test_gateway_agent_install.py +0 -0
  323. {pocketshell-0.5.10 → pocketshell-0.5.11}/tests/gateway/test_gateway_agent_resume.py +0 -0
  324. {pocketshell-0.5.10 → pocketshell-0.5.11}/tests/gateway/test_gateway_agent_setup_cli.py +0 -0
  325. {pocketshell-0.5.10 → pocketshell-0.5.11}/tests/gateway/test_gateway_auth_cli.py +0 -0
  326. {pocketshell-0.5.10 → pocketshell-0.5.11}/tests/gateway/test_gateway_cli.py +0 -0
  327. {pocketshell-0.5.10 → pocketshell-0.5.11}/tests/gateway/test_gateway_connect_e2e.py +0 -0
  328. {pocketshell-0.5.10 → pocketshell-0.5.11}/tests/gateway/test_gateway_devices.py +0 -0
  329. {pocketshell-0.5.10 → pocketshell-0.5.11}/tests/gateway/test_gateway_endpoint.py +0 -0
  330. {pocketshell-0.5.10 → pocketshell-0.5.11}/tests/gateway/test_gateway_endpoint_setup.py +0 -0
  331. {pocketshell-0.5.10 → pocketshell-0.5.11}/tests/gateway/test_gateway_enroll_login.py +0 -0
  332. {pocketshell-0.5.10 → pocketshell-0.5.11}/tests/gateway/test_gateway_exec_passthrough.py +0 -0
  333. {pocketshell-0.5.10 → pocketshell-0.5.11}/tests/gateway/test_gateway_helper_metadata.py +0 -0
  334. {pocketshell-0.5.10 → pocketshell-0.5.11}/tests/gateway/test_gateway_helper_resolution.py +0 -0
  335. {pocketshell-0.5.10 → pocketshell-0.5.11}/tests/gateway/test_gateway_helper_wheel.py +0 -0
  336. {pocketshell-0.5.10 → pocketshell-0.5.11}/tests/gateway/test_gateway_pins.py +0 -0
  337. {pocketshell-0.5.10 → pocketshell-0.5.11}/tests/gateway/test_gateway_proxy.py +0 -0
  338. {pocketshell-0.5.10 → pocketshell-0.5.11}/tests/gateway/test_gateway_service.py +0 -0
  339. {pocketshell-0.5.10 → pocketshell-0.5.11}/tests/gateway/test_gateway_service_endpoint.py +0 -0
  340. {pocketshell-0.5.10 → pocketshell-0.5.11}/tests/gateway/test_gateway_service_task_acl.py +0 -0
  341. {pocketshell-0.5.10 → pocketshell-0.5.11}/tests/gateway/test_gateway_service_task_object.py +0 -0
  342. {pocketshell-0.5.10 → pocketshell-0.5.11}/tests/gateway/test_gateway_ssh.py +0 -0
  343. {pocketshell-0.5.10 → pocketshell-0.5.11}/tests/gateway/test_gateway_ssh_key.py +0 -0
  344. {pocketshell-0.5.10 → pocketshell-0.5.11}/tests/gateway/test_gateway_ssh_key_e2e.py +0 -0
  345. {pocketshell-0.5.10 → pocketshell-0.5.11}/tests/gateway/test_gateway_status.py +0 -0
  346. {pocketshell-0.5.10 → pocketshell-0.5.11}/tests/gateway/test_gateway_user_agent.py +0 -0
  347. {pocketshell-0.5.10 → pocketshell-0.5.11}/tests/gateway/test_private_endpoint.py +0 -0
  348. {pocketshell-0.5.10 → pocketshell-0.5.11}/tests/gateway/test_windows_agent_install_native.py +0 -0
  349. {pocketshell-0.5.10 → pocketshell-0.5.11}/tests/gateway/test_windows_aplexer_probe_native.py +0 -0
  350. {pocketshell-0.5.10 → pocketshell-0.5.11}/tests/gateway/test_windows_complete_runtime_native.py +0 -0
  351. {pocketshell-0.5.10 → pocketshell-0.5.11}/tests/gateway/test_windows_endpoint_keys_native.py +0 -0
  352. {pocketshell-0.5.10 → pocketshell-0.5.11}/tests/gateway/test_windows_gateway_e2e.py +0 -0
  353. {pocketshell-0.5.10 → pocketshell-0.5.11}/tests/gateway/test_windows_gateway_service_native.py +0 -0
  354. {pocketshell-0.5.10 → pocketshell-0.5.11}/tests/gateway/test_windows_gateway_user_agent_native.py +0 -0
  355. {pocketshell-0.5.10 → pocketshell-0.5.11}/tests/gateway/test_windows_helper_execution.py +0 -0
  356. {pocketshell-0.5.10 → pocketshell-0.5.11}/tests/gateway/test_windows_launcher_quiet_native.py +0 -0
  357. {pocketshell-0.5.10 → pocketshell-0.5.11}/tests/gateway/test_windows_release_closure_native.py +0 -0
  358. {pocketshell-0.5.10 → pocketshell-0.5.11}/tests/gateway/test_windows_service_private_read.py +0 -0
  359. {pocketshell-0.5.10 → pocketshell-0.5.11}/tests/gateway/test_windows_spawn_entry_tree_native.py +0 -0
  360. {pocketshell-0.5.10 → pocketshell-0.5.11}/tests/gateway/test_windows_sshcmd.py +0 -0
  361. {pocketshell-0.5.10 → pocketshell-0.5.11}/tests/gateway/test_windows_verify_native.py +0 -0
  362. {pocketshell-0.5.10 → pocketshell-0.5.11}/tests/gateway/test_windows_winssh_native.py +0 -0
  363. {pocketshell-0.5.10 → pocketshell-0.5.11}/tests/gateway/test_winssh.py +0 -0
  364. {pocketshell-0.5.10 → pocketshell-0.5.11}/tests/gateway/unelevated.py +0 -0
  365. {pocketshell-0.5.10 → pocketshell-0.5.11}/tests/keys/conftest.py +0 -0
  366. {pocketshell-0.5.10 → pocketshell-0.5.11}/tests/keys/keyhelpers.py +0 -0
  367. {pocketshell-0.5.10 → pocketshell-0.5.11}/tests/keys/test_keys_cli.py +0 -0
  368. {pocketshell-0.5.10 → pocketshell-0.5.11}/tests/keys/test_keys_crypto.py +0 -0
  369. {pocketshell-0.5.10 → pocketshell-0.5.11}/tests/keys/test_keys_store.py +0 -0
  370. {pocketshell-0.5.10 → pocketshell-0.5.11}/tests/link/test_adversarial_security.py +0 -0
  371. {pocketshell-0.5.10 → pocketshell-0.5.11}/tests/link/test_cli_link.py +0 -0
  372. {pocketshell-0.5.10 → pocketshell-0.5.11}/tests/link/test_exec_semantics.py +0 -0
  373. {pocketshell-0.5.10 → pocketshell-0.5.11}/tests/link/test_loopback.py +0 -0
  374. {pocketshell-0.5.10 → pocketshell-0.5.11}/tests/link/test_protocol.py +0 -0
  375. {pocketshell-0.5.10 → pocketshell-0.5.11}/tests/link/test_resilience.py +0 -0
  376. {pocketshell-0.5.10 → pocketshell-0.5.11}/tests/link/test_workload_integrity.py +0 -0
  377. {pocketshell-0.5.10 → pocketshell-0.5.11}/tests/release/test_build_backend.py +0 -0
  378. {pocketshell-0.5.10 → pocketshell-0.5.11}/tests/test_agent_card_push.py +0 -0
  379. {pocketshell-0.5.10 → pocketshell-0.5.11}/tests/test_agent_log.py +0 -0
  380. {pocketshell-0.5.10 → pocketshell-0.5.11}/tests/test_agents.py +0 -0
  381. {pocketshell-0.5.10 → pocketshell-0.5.11}/tests/test_agents_kind.py +0 -0
  382. {pocketshell-0.5.10 → pocketshell-0.5.11}/tests/test_antigravity.py +0 -0
  383. {pocketshell-0.5.10 → pocketshell-0.5.11}/tests/test_aplexer_contract.py +0 -0
  384. {pocketshell-0.5.10 → pocketshell-0.5.11}/tests/test_aplexer_resolution.py +0 -0
  385. {pocketshell-0.5.10 → pocketshell-0.5.11}/tests/test_attachments.py +0 -0
  386. {pocketshell-0.5.10 → pocketshell-0.5.11}/tests/test_cards.py +0 -0
  387. {pocketshell-0.5.10 → pocketshell-0.5.11}/tests/test_cards_push_notify.py +0 -0
  388. {pocketshell-0.5.10 → pocketshell-0.5.11}/tests/test_cgroup_agents.py +0 -0
  389. {pocketshell-0.5.10 → pocketshell-0.5.11}/tests/test_cli.py +0 -0
  390. {pocketshell-0.5.10 → pocketshell-0.5.11}/tests/test_daemon.py +0 -0
  391. {pocketshell-0.5.10 → pocketshell-0.5.11}/tests/test_daemon_fallback.py +0 -0
  392. {pocketshell-0.5.10 → pocketshell-0.5.11}/tests/test_daemon_wire.py +0 -0
  393. {pocketshell-0.5.10 → pocketshell-0.5.11}/tests/test_engines.py +0 -0
  394. {pocketshell-0.5.10 → pocketshell-0.5.11}/tests/test_env.py +0 -0
  395. {pocketshell-0.5.10 → pocketshell-0.5.11}/tests/test_github.py +0 -0
  396. {pocketshell-0.5.10 → pocketshell-0.5.11}/tests/test_hooks.py +0 -0
  397. {pocketshell-0.5.10 → pocketshell-0.5.11}/tests/test_logs.py +0 -0
  398. {pocketshell-0.5.10 → pocketshell-0.5.11}/tests/test_main.py +0 -0
  399. {pocketshell-0.5.10 → pocketshell-0.5.11}/tests/test_profiles.py +0 -0
  400. {pocketshell-0.5.10 → pocketshell-0.5.11}/tests/test_push.py +0 -0
  401. {pocketshell-0.5.10 → pocketshell-0.5.11}/tests/test_repos.py +0 -0
  402. {pocketshell-0.5.10 → pocketshell-0.5.11}/tests/test_serve.py +0 -0
  403. {pocketshell-0.5.10 → pocketshell-0.5.11}/tests/test_serve_http.py +0 -0
  404. {pocketshell-0.5.10 → pocketshell-0.5.11}/tests/test_session_cgroup_kernel_proof.py +0 -0
  405. {pocketshell-0.5.10 → pocketshell-0.5.11}/tests/test_session_enum.py +0 -0
  406. {pocketshell-0.5.10 → pocketshell-0.5.11}/tests/test_sessions.py +0 -0
  407. {pocketshell-0.5.10 → pocketshell-0.5.11}/tests/test_sessions_attach.py +0 -0
  408. {pocketshell-0.5.10 → pocketshell-0.5.11}/tests/test_sessions_create_routing.py +0 -0
  409. {pocketshell-0.5.10 → pocketshell-0.5.11}/tests/test_sessions_kill.py +0 -0
  410. {pocketshell-0.5.10 → pocketshell-0.5.11}/tests/test_sessions_mem_cap.py +0 -0
  411. {pocketshell-0.5.10 → pocketshell-0.5.11}/tests/test_sessions_rename.py +0 -0
  412. {pocketshell-0.5.10 → pocketshell-0.5.11}/tests/test_sessions_warnings.py +0 -0
  413. {pocketshell-0.5.10 → pocketshell-0.5.11}/tests/test_tree.py +0 -0
  414. {pocketshell-0.5.10 → pocketshell-0.5.11}/tests/test_usage.py +0 -0
  415. {pocketshell-0.5.10 → pocketshell-0.5.11}/tests/test_usage_capture.py +0 -0
  416. {pocketshell-0.5.10 → pocketshell-0.5.11}/tests/test_usage_reset.py +0 -0
  417. {pocketshell-0.5.10 → pocketshell-0.5.11}/tests/test_windows_startup.py +0 -0
  418. {pocketshell-0.5.10 → pocketshell-0.5.11}/tests/test_workspaces.py +0 -0
  419. {pocketshell-0.5.10 → pocketshell-0.5.11}/tests/tray/__init__.py +0 -0
  420. {pocketshell-0.5.10 → pocketshell-0.5.11}/tests/tray/conftest.py +0 -0
  421. {pocketshell-0.5.10 → pocketshell-0.5.11}/tests/tray/test_app.py +0 -0
  422. {pocketshell-0.5.10 → pocketshell-0.5.11}/tests/tray/test_autostart.py +0 -0
  423. {pocketshell-0.5.10 → pocketshell-0.5.11}/tests/tray/test_bundle.py +0 -0
  424. {pocketshell-0.5.10 → pocketshell-0.5.11}/tests/tray/test_cli.py +0 -0
  425. {pocketshell-0.5.10 → pocketshell-0.5.11}/tests/tray/test_endpoint_native.py +0 -0
  426. {pocketshell-0.5.10 → pocketshell-0.5.11}/tests/tray/test_gateway_auth.py +0 -0
  427. {pocketshell-0.5.10 → pocketshell-0.5.11}/tests/tray/test_icons.py +0 -0
  428. {pocketshell-0.5.10 → pocketshell-0.5.11}/tests/tray/test_model.py +0 -0
  429. {pocketshell-0.5.10 → pocketshell-0.5.11}/tests/tray/test_private_replacement.py +0 -0
  430. {pocketshell-0.5.10 → pocketshell-0.5.11}/tests/tray/test_repair.py +0 -0
  431. {pocketshell-0.5.10 → pocketshell-0.5.11}/tests/tray/test_single_instance.py +0 -0
  432. {pocketshell-0.5.10 → pocketshell-0.5.11}/tests/tray/test_status_client.py +0 -0
  433. {pocketshell-0.5.10 → pocketshell-0.5.11}/tests/tray/test_supervisor.py +0 -0
  434. {pocketshell-0.5.10 → pocketshell-0.5.11}/tests/tray/test_windows_sessions.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: pocketshell
3
- Version: 0.5.10
3
+ Version: 0.5.11
4
4
  Summary: Unified server-side Python utility for the PocketShell Android and desktop clients.
5
5
  Project-URL: Homepage, https://github.com/PocketShell-io/pocketshell-cli
6
6
  Project-URL: Issues, https://github.com/PocketShell-io/pocketshell-cli/issues
@@ -151,12 +151,38 @@ The portable client input is Microsoft's official Win32-OpenSSH release
151
151
  `23f50f3458c4c5d0b12217c6a5ddfde0137210a30fa870e98b29827f7b43aba5`.
152
152
  The builder copies only `ssh.exe` and license notices, validates Microsoft's
153
153
  signature, and records the archive and executable digests. PSC validates the
154
- signature again on the installed copy. Its installer is adapted and recatalogued
155
- to use the supplied client and a separate `gateway-ssh10` version directory;
156
- existing inbox-client bindings and account state are preserved.
154
+ signature again on the installed copy. The package's own `install.ps1` is
155
+ replaced by the tray's `scripts/release/psc-install.ps1` (the builder pins the
156
+ reviewed upstream script and recatalogues the package). It uses the supplied
157
+ client and keeps existing inbox-client bindings and account state.
157
158
  No system SSH service, feature, configuration or firewall rule is changed.
158
- PSC versions are installed in `%LOCALAPPDATA%\PocketShell\psc\<version>-gateway-ssh10`;
159
- reinstalling the identical package verifies and reuses that version. Changed
160
- bytes or executable bindings require a fresh version. Account, pins and hosts stay in separate state
159
+
160
+ Re-running any installer over any existing PSC install succeeds, whether it is
161
+ the same version, older, newer or partly broken:
162
+
163
+ - PSC trees are content-addressed:
164
+ `%LOCALAPPDATA%\PocketShell\psc\<version>-gateway-ssh10-<content id>`. The
165
+ content id is a digest of every installed file and the bundled `ssh.exe`
166
+ (`installer-receipt.json` records it as `psc.contentId`).
167
+ - A tree that verifies completely (inventory, digests, `ssh.exe`, bindings) is
168
+ reused read-only.
169
+ - Anything else is built in a private staging directory and published with
170
+ one directory rename. A broken tree is moved aside first. If it is in use, the
171
+ new tree gets a unique sibling name.
172
+ - The `bin\psc.cmd` shim is switched last, with an atomic file replace, after
173
+ the new tree passed the native security preflight, `--version` and `hosts`.
174
+ - Bindings use the OS folder paths, not the caller's environment, so an
175
+ install from an SSH session without `SystemRoot` works.
176
+ - Superseded trees from this installer are removed, except the active tree
177
+ and the previously active one. Locked leftovers only log a warning.
178
+
179
+ If this package cannot be activated but the previous PSC still works, the
180
+ installer exits 3: the previous PSC stays active and `psc-install.log` gets a
181
+ warning, with no dialog. Only when no working PSC exists does the installer
182
+ report a PSC failure (the gateway still installs). `psc-install.log` ends with
183
+ `PSC installer exit code: N`. The release workflow runs real installers in this
184
+ order: previous release, new, new again, new over a broken tree, previous over
185
+ new, new again (`tests/release/test_windows_psc_upgrade_native.py`).
186
+ Account, pins and hosts stay in separate state
161
187
  directories. Gateway uninstall retains the independent PSC install and PATH
162
188
  shim, just as it retains gateway private state.
@@ -11,7 +11,7 @@ name = "pocketshell"
11
11
  # since the extraction (PocketShell-io/pocketshell#2643): the first
12
12
  # self-governed release is 0.5.5, continuing from the last app-coupled
13
13
  # release 0.5.4 so `uv tool upgrade pocketshell` stays monotonic.
14
- version = "0.5.10"
14
+ version = "0.5.11"
15
15
  description = "Unified server-side Python utility for the PocketShell Android and desktop clients."
16
16
  readme = "README.md"
17
17
  requires-python = ">=3.11"
@@ -203,29 +203,50 @@ def stage_ssh_client(archive_path, expected_sha256, destination):
203
203
  return {"zipSHA256": expected_sha256, "sshSHA256": digest(destination / "ssh.exe")}
204
204
 
205
205
 
206
- def configure_offline_psc(destination):
207
- """Use a separate version tree so a former inbox-SSH binding stays intact."""
206
+ def psc_content_id(manifest, ssh_sha256):
207
+ """Short identity of what install.ps1 writes into a version tree.
208
+
209
+ The upstream installer treats an existing `<version>` tree as the same
210
+ package and refuses any byte difference ("Existing PSC version differs;
211
+ use a fresh version"). Rebuilt packages keep their version string, so
212
+ the tree name carries this digest of every installed file plus the
213
+ bundled ssh.exe: changed content installs side by side into a fresh
214
+ tree and the bin shim switches to it, while an identical reinstall
215
+ still maps onto its existing tree.
216
+ """
217
+ rows = sorted((name, sha) for name, sha in manifest["files"].items() if name != "install.ps1")
218
+ material = json.dumps({"files": rows, "ssh": ssh_sha256}, separators=(",", ":")).encode()
219
+ return hashlib.sha256(material).hexdigest()[:12]
220
+
221
+
222
+ # The standalone package's own install.ps1 (pocketshell-tui-client
223
+ # scripts/windows/install.ps1 at the workflow's CLIENT_REF). It is replaced by
224
+ # scripts/release/psc-install.ps1; a different upstream script must be reviewed
225
+ # for changes the replacement has to carry over before this pin moves.
226
+ UPSTREAM_PSC_INSTALL_SHA256 = "f22200ddc623459c1a6bb522438ee241aa3367459020a774c8fd6b1abf8542e3"
227
+ PSC_INSTALL_TEMPLATE = REPO / "scripts/release/psc-install.ps1"
228
+
229
+
230
+ def configure_offline_psc(destination, ssh_sha256):
231
+ """Install PSC with the tray's own content-addressed, atomic installer.
232
+
233
+ Re-running any installer over any existing PSC install must succeed: the
234
+ tree is named by content, a verified tree is reused, anything else is
235
+ rebuilt in staging and published by rename, and the shim switches last.
236
+ """
208
237
  script = destination / "install.ps1"
209
- text = script.read_text(encoding="utf-8")
210
- old = 'param([string]$SshPath = "$env:SystemRoot\\System32\\OpenSSH\\ssh.exe")'
211
- new = ('param([string]$SshPath, [ValidatePattern("^gateway-ssh[0-9]+$")]'
212
- '[string]$InstallVariant = "gateway-ssh10")')
213
- prefix = '$dest = "$base\\$($manifest.version)"'
214
- if text.count(old) != 1 or text.count(prefix) != 1:
238
+ if digest(script) != UPSTREAM_PSC_INSTALL_SHA256:
215
239
  raise ValueError("PSC installer changed; review the offline adaptation")
216
- # PowerShell 5 Set-Acl tries to write auditing on an existing protected
217
- # object and can require SeSecurityPrivilege. The .NET object method writes
218
- # only the owner/DACL sections changed above, with identical private ACEs.
219
- text = text.replace('Set-Acl -LiteralPath $Path -AclObject $acl', '$item.SetAccessControl($acl)')
220
- env_write = "[Environment]::SetEnvironmentVariable('Path', (($oldPath.TrimEnd(';') + ';' + $bin).TrimStart(';')), 'User')"
221
- text = text.replace(env_write, "try { " + env_write + " } catch [System.Security.SecurityException] { "
222
- "Write-Warning 'User PATH is read-only. Launch PSC Terminal from the Start menu.' }")
223
- script.write_text(text.replace(old, new).replace(prefix,
224
- '$dest = "$base\\$($manifest.version)-$InstallVariant"'), encoding="utf-8")
225
240
  manifest_path = destination / "package-manifest.json"
226
241
  manifest = json.loads(manifest_path.read_text())
242
+ content_id = psc_content_id(manifest, ssh_sha256)
243
+ template = PSC_INSTALL_TEMPLATE.read_text(encoding="utf-8")
244
+ if template.count("'@CONTENT_ID@'") != 1:
245
+ raise ValueError("PSC installer template has no content id placeholder")
246
+ script.write_bytes(template.replace("@CONTENT_ID@", content_id).encode("utf-8"))
227
247
  manifest["files"]["install.ps1"] = digest(script)
228
248
  manifest_path.write_text(json.dumps(manifest, indent=2), encoding="utf-8")
249
+ return content_id
229
250
 
230
251
 
231
252
  def stage_private_backend(source, receipt_sha256, root, catalog):
@@ -320,7 +341,8 @@ def build(args):
320
341
  root = out / "payload" / "runtime"
321
342
  psc_receipt = stage_psc(args.psc_zip, args.psc_sha256, out / "payload" / "psc-package")
322
343
  psc_receipt["sshClient"] = stage_ssh_client(args.ssh_zip, args.ssh_sha256, out / "payload" / "psc-ssh")
323
- configure_offline_psc(out / "payload" / "psc-package")
344
+ psc_receipt["contentId"] = configure_offline_psc(out / "payload" / "psc-package",
345
+ psc_receipt["sshClient"]["sshSHA256"])
324
346
  psc_receipt["installVariant"] = "gateway-ssh10"
325
347
  psc_receipt["adaptedInstallerSHA256"] = digest(out / "payload" / "psc-package/install.ps1")
326
348
  shutil.copytree(source / "runtime", root)
@@ -0,0 +1,283 @@
1
+ param([Parameter(Mandatory = $true)][string]$SshPath,
2
+ [ValidatePattern('^gateway-ssh[0-9]+$')][string]$InstallVariant = 'gateway-ssh10')
3
+ # PSC installer for the PocketShell Gateway tray installer (pocketshell-cli).
4
+ # It replaces the standalone package's install.ps1 (whose reviewed upstream
5
+ # digest the builder checks) with the same verification and native security
6
+ # preflight, plus one rule: re-running ANY installer over ANY existing PSC
7
+ # install succeeds.
8
+ #
9
+ # - Every version tree is content-addressed: <version>-<variant>-<content id>
10
+ # (a digest of every installed file and the bundled ssh.exe, baked in at
11
+ # build time). A tree that verifies completely is reused read-only.
12
+ # - Anything else (missing, partial, tampered, other bindings) is rebuilt in a
13
+ # private staging directory and published with one directory rename. A
14
+ # broken tree is moved aside first, or, if it is locked, a unique sibling
15
+ # name is used.
16
+ # - The bin\psc.cmd shim is switched last, with an atomic file replace, and
17
+ # only after the new tree passed every check.
18
+ # Exit codes: 0 = this package is active; 3 = this package could not be
19
+ # activated but the previous working PSC stays active (a warning, never a
20
+ # failure dialog); 1 = no working PSC.
21
+ $ErrorActionPreference = 'Stop'
22
+ Set-StrictMode -Version Latest
23
+ foreach ($module in @('Microsoft.PowerShell.Utility', 'Microsoft.PowerShell.Management', 'Microsoft.PowerShell.Security')) {
24
+ Import-Module -Name "$PSHOME\Modules\$module\$module.psd1" -Force
25
+ }
26
+ $ContentId = '@CONTENT_ID@'
27
+ if ($ContentId -notmatch '^[0-9a-f]{12}$') { throw 'PSC installer was not configured with a content id' }
28
+
29
+ function Assert-PlainPath([string]$Path) {
30
+ if ($Path -notmatch '^[A-Za-z]:\\' -or $Path -match '[\s%"<>|?*]' -or $Path.Substring(2).Contains(':')) {
31
+ throw "PSC requires a local absolute path without spaces or shell characters: $Path"
32
+ }
33
+ $cursor = $Path
34
+ while ($cursor) {
35
+ if (Test-Path -LiteralPath $cursor) {
36
+ $item = Get-Item -LiteralPath $cursor -Force
37
+ if ($item.Attributes -band [IO.FileAttributes]::ReparsePoint) { throw "PSC refuses redirected paths: $cursor" }
38
+ }
39
+ $parent = Split-Path -Parent $cursor
40
+ if ($parent -eq $cursor) { break }
41
+ $cursor = $parent
42
+ }
43
+ }
44
+
45
+ $owner = [Security.Principal.WindowsIdentity]::GetCurrent().User
46
+ $system = [Security.Principal.SecurityIdentifier]::new('S-1-5-18')
47
+ function Protect-Item([string]$Path) {
48
+ $item = Get-Item -LiteralPath $Path -Force
49
+ if ($item.Attributes -band [IO.FileAttributes]::ReparsePoint) { throw "PSC refuses links: $Path" }
50
+ if ($item.PSIsContainer) { $acl = [Security.AccessControl.DirectorySecurity]::new() }
51
+ else { $acl = [Security.AccessControl.FileSecurity]::new() }
52
+ $acl.SetOwner($owner)
53
+ $acl.SetAccessRuleProtection($true, $false)
54
+ foreach ($sid in @($owner, $system)) {
55
+ # No inheritance flags: the helper requires explicit ACEs on private objects.
56
+ $acl.AddAccessRule([Security.AccessControl.FileSystemAccessRule]::new($sid, 'FullControl', 'Allow'))
57
+ }
58
+ # PowerShell 5 Set-Acl may need SeSecurityPrivilege on protected objects;
59
+ # the .NET method writes only the owner and DACL set above.
60
+ $item.SetAccessControl($acl)
61
+ }
62
+
63
+ function Invoke-Security([string]$Tree, [hashtable]$Request) {
64
+ # Use the tree's own Node and native authority for the exact protocol.
65
+ # Base64 argv avoids PowerShell 5/7 native stdin encoding differences.
66
+ $json = $Request | ConvertTo-Json -Compress
67
+ $encoded = [Convert]::ToBase64String([Text.UTF8Encoding]::new($false).GetBytes($json))
68
+ & "$Tree\node.exe" "$Tree\psc\scripts\install-preflight.mjs" $encoded
69
+ if ($LASTEXITCODE -ne 0) { throw 'PSC native security preflight refused' }
70
+ }
71
+
72
+ # The OS folders, not the caller's environment: an SSH session may lack
73
+ # SystemRoot or carry a forward-slash WINDIR. PSC binds these values.
74
+ $systemRoot = [Environment]::GetFolderPath('Windows')
75
+ $systemDrive = $systemRoot.Substring(0, 2)
76
+ $programData = [Environment]::GetFolderPath('CommonApplicationData')
77
+ $localAppData = [Environment]::GetFolderPath('LocalApplicationData')
78
+
79
+ $manifest = Get-Content -LiteralPath "$PSScriptRoot\package-manifest.json" -Raw | ConvertFrom-Json
80
+ if ($manifest.version -notmatch '^\d+\.\d+\.\d+$') { throw 'Invalid PSC package version' }
81
+ $base = "$localAppData\PocketShell\psc"
82
+ $name = "$($manifest.version)-$InstallVariant-$ContentId"
83
+ $bin = "$base\bin"
84
+ $shim = "$bin\psc.cmd"
85
+ foreach ($p in @($env:USERPROFILE, $localAppData, $base, "$base\$name", $bin, $SshPath, $systemRoot, $programData)) { Assert-PlainPath $p }
86
+ if (!(Test-Path -LiteralPath $SshPath -PathType Leaf) -or (Split-Path -Leaf $SshPath) -ine 'ssh.exe') {
87
+ throw 'Win32 OpenSSH ssh.exe is required.'
88
+ }
89
+ $installedNames = @(@($manifest.files.PSObject.Properties.Name | Where-Object { $_ -ne 'install.ps1' }) +
90
+ 'psc/dist/windows-bindings.json' + 'ssh.exe' | Sort-Object)
91
+
92
+ function Get-Bindings([string]$Tree) {
93
+ $helper = "$Tree\psc-security.exe"; $node = "$Tree\node.exe"; $entry = "$Tree\psc\dist\cli.js"; $ssh = "$Tree\ssh.exe"
94
+ return [ordered]@{
95
+ version = 2; sshFamily = 'win32-openssh'
96
+ helper = $helper; helperSha256 = (Get-FileHash $helper).Hash.ToLowerInvariant()
97
+ ssh = $ssh; sshSha256 = (Get-FileHash $ssh).Hash.ToLowerInvariant()
98
+ node = $node; nodeSha256 = (Get-FileHash $node).Hash.ToLowerInvariant()
99
+ entry = $entry; entrySha256 = (Get-FileHash $entry).Hash.ToLowerInvariant()
100
+ systemRoot = $systemRoot; systemDrive = $systemDrive; programData = $programData
101
+ }
102
+ }
103
+
104
+ # A tree is reusable only if it is exactly this package: inventory, every
105
+ # digest, the bundled ssh.exe and its bindings. Any error means "not reusable".
106
+ function Test-Tree([string]$Tree) {
107
+ try {
108
+ if (!(Test-Path -LiteralPath $Tree -PathType Container)) { return $false }
109
+ $actual = @(Get-ChildItem -LiteralPath $Tree -Recurse -File -Force | ForEach-Object {
110
+ $_.FullName.Substring($Tree.Length + 1).Replace('\', '/')
111
+ } | Where-Object { $_ -ne 'package-manifest.json' } | Sort-Object)
112
+ if (Compare-Object $installedNames $actual) { return $false }
113
+ foreach ($row in $manifest.files.PSObject.Properties) {
114
+ if ($row.Name -eq 'install.ps1') { continue }
115
+ if ((Get-FileHash -LiteralPath (Join-Path $Tree $row.Name)).Hash.ToLowerInvariant() -ne $row.Value) { return $false }
116
+ }
117
+ if ((Get-FileHash -LiteralPath "$Tree\ssh.exe").Hash -ne (Get-FileHash -LiteralPath $SshPath).Hash) { return $false }
118
+ $existing = Get-Content -LiteralPath "$Tree\psc\dist\windows-bindings.json" -Raw | ConvertFrom-Json
119
+ $expected = Get-Bindings $Tree
120
+ if (@($existing.PSObject.Properties).Count -ne $expected.Count) { return $false }
121
+ foreach ($key in $expected.Keys) { if ($existing.$key -cne $expected[$key]) { return $false } }
122
+ return $true
123
+ } catch {
124
+ return $false
125
+ }
126
+ }
127
+
128
+ # The tree the current shim runs, when it still has its entry points.
129
+ function Get-ActiveTree {
130
+ try {
131
+ if (!(Test-Path -LiteralPath $shim -PathType Leaf)) { return $null }
132
+ $match = [regex]::Match((Get-Content -LiteralPath $shim -Raw), 'call "([^"]+)\\psc\.cmd"')
133
+ if (!$match.Success) { return $null }
134
+ $tree = $match.Groups[1].Value
135
+ foreach ($f in @('psc.cmd', 'node.exe', 'psc\dist\cli.js')) {
136
+ if (!(Test-Path -LiteralPath "$tree\$f" -PathType Leaf)) { return $null }
137
+ }
138
+ return $tree
139
+ } catch {
140
+ return $null
141
+ }
142
+ }
143
+
144
+ function Remove-Quietly([string]$Path) {
145
+ try { if (Test-Path -LiteralPath $Path) { Remove-Item -LiteralPath $Path -Recurse -Force } }
146
+ catch { Write-Warning "Could not remove $Path (in use?); it is left in place: $($_.Exception.Message)" }
147
+ }
148
+
149
+ function Publish-Tree {
150
+ # Choose the final name before building: bindings record absolute paths.
151
+ $final = "$base\$name"
152
+ if (Test-Path -LiteralPath $final) {
153
+ $aside = "$base\.trash-$([guid]::NewGuid().ToString('N'))"
154
+ try {
155
+ Rename-Item -LiteralPath $final -NewName (Split-Path -Leaf $aside)
156
+ Remove-Quietly $aside
157
+ } catch {
158
+ Write-Warning "The existing $name tree is not reusable and is in use; installing beside it."
159
+ $final = "$base\$name-r$([guid]::NewGuid().ToString('N').Substring(0, 8))"
160
+ }
161
+ }
162
+ $stage = "$base\.stage-$([guid]::NewGuid().ToString('N'))"
163
+ try {
164
+ New-Item -ItemType Directory -Path $stage | Out-Null
165
+ Protect-Item $stage
166
+ Copy-Item -LiteralPath "$PSScriptRoot\node.exe", "$PSScriptRoot\psc-security.exe", "$PSScriptRoot\psc.cmd",
167
+ "$PSScriptRoot\NODE-LICENSE.txt", "$PSScriptRoot\package-manifest.json" -Destination $stage
168
+ Copy-Item -LiteralPath "$PSScriptRoot\psc" -Destination $stage -Recurse
169
+ # Inbox or bundled files can be hardlinked or carry ACLs rejected by the
170
+ # helper. Copy, verify Microsoft's signature on the actual copy, then protect.
171
+ Copy-Item -LiteralPath $SshPath -Destination "$stage\ssh.exe"
172
+ $signature = Get-AuthenticodeSignature -LiteralPath "$stage\ssh.exe"
173
+ if ($signature.Status -ne 'Valid' -or $signature.SignerCertificate.Subject -notmatch 'O=Microsoft Corporation(?:,|$)') {
174
+ throw 'PSC requires a valid Microsoft-signed Win32 OpenSSH client'
175
+ }
176
+ # Bindings name the published paths; the digests are of the staged bytes.
177
+ $bindings = Get-Bindings $stage
178
+ foreach ($key in @('helper', 'ssh', 'node', 'entry')) { $bindings[$key] = $bindings[$key].Replace($stage, $final) }
179
+ [IO.File]::WriteAllText("$stage\psc\dist\windows-bindings.json", ($bindings | ConvertTo-Json), [Text.UTF8Encoding]::new($false))
180
+ Get-ChildItem -LiteralPath $stage -Recurse -Force | ForEach-Object { Protect-Item $_.FullName }
181
+ # One rename publishes the complete tree.
182
+ Rename-Item -LiteralPath $stage -NewName (Split-Path -Leaf $final)
183
+ } catch {
184
+ Remove-Quietly $stage
185
+ throw
186
+ }
187
+ if (!(Test-Tree $final)) { Remove-Quietly $final; throw 'The published PSC tree did not verify' }
188
+ return $final
189
+ }
190
+
191
+ function Set-Shim([string]$Tree) {
192
+ New-Item -ItemType Directory -Path $bin -Force | Out-Null
193
+ Protect-Item $bin
194
+ $text = "@echo off`r`ncall `"$Tree\psc.cmd`" %*`r`nexit /b %errorlevel%`r`n"
195
+ if ((Test-Path -LiteralPath $shim -PathType Leaf) -and (Get-Content -LiteralPath $shim -Raw) -ceq $text) { return }
196
+ $next = "$bin\.psc.cmd.$([guid]::NewGuid().ToString('N'))"
197
+ [IO.File]::WriteAllText($next, $text, [Text.UTF8Encoding]::new($false))
198
+ Protect-Item $next
199
+ if (Test-Path -LiteralPath $shim) { [IO.File]::Replace($next, $shim, [NullString]::Value) }
200
+ else { [IO.File]::Move($next, $shim) }
201
+ }
202
+
203
+ function Update-UserPath {
204
+ $oldPath = [string][Environment]::GetEnvironmentVariable('Path', 'User')
205
+ if ($bin -notin ($oldPath -split ';')) {
206
+ try { [Environment]::SetEnvironmentVariable('Path', (($oldPath.TrimEnd(';') + ';' + $bin).TrimStart(';')), 'User') }
207
+ catch [System.Security.SecurityException] { Write-Warning 'User PATH is read-only. Launch PSC Terminal from the Start menu.' }
208
+ }
209
+ $env:Path = "$bin;$env:Path"
210
+ try {
211
+ # Explorer refreshes its environment for subsequently opened terminals.
212
+ if (!(('PscEnvironmentNotify' -as [type]))) {
213
+ Add-Type @'
214
+ using System;
215
+ using System.Runtime.InteropServices;
216
+ public static class PscEnvironmentNotify {
217
+ [DllImport("user32.dll", CharSet = CharSet.Unicode, SetLastError = true)]
218
+ public static extern IntPtr SendMessageTimeout(IntPtr hWnd, uint msg,
219
+ UIntPtr wParam, string lParam, uint flags, uint timeout, out UIntPtr result);
220
+ }
221
+ '@
222
+ }
223
+ $notification = [UIntPtr]::Zero
224
+ [void][PscEnvironmentNotify]::SendMessageTimeout([IntPtr]0xffff, 0x1a, [UIntPtr]::Zero, 'Environment', 2, 5000, [ref]$notification)
225
+ } catch {
226
+ Write-Warning "Could not notify Explorer of the PATH change: $($_.Exception.Message)"
227
+ }
228
+ }
229
+
230
+ # Remove only our own superseded content-addressed trees and leftovers;
231
+ # keep the active tree and the one the previous shim ran.
232
+ function Remove-Superseded([string]$Active, [string]$Previous) {
233
+ Get-ChildItem -LiteralPath $base -Directory -Force -ErrorAction SilentlyContinue | Where-Object {
234
+ $_.Name -match "^(\d+\.\d+\.\d+-$InstallVariant-[0-9a-f]{12}(-r[0-9a-f]{8})?|\.stage-[0-9a-f]{32}|\.trash-[0-9a-f]{32})$" -and
235
+ $_.FullName -ne $Active -and $_.FullName -ne $Previous
236
+ } | ForEach-Object { Remove-Quietly $_.FullName }
237
+ }
238
+
239
+ $previous = Get-ActiveTree
240
+ try {
241
+ New-Item -ItemType Directory -Path $base -Force | Out-Null
242
+ # The package itself must be complete and exact before anything is published.
243
+ $expected = @($manifest.files.PSObject.Properties.Name) | Sort-Object
244
+ $actual = @(Get-ChildItem -LiteralPath $PSScriptRoot -Recurse -File | ForEach-Object {
245
+ $_.FullName.Substring($PSScriptRoot.Length + 1).Replace('\', '/')
246
+ } | Where-Object { $_ -ne 'package-manifest.json' }) | Sort-Object
247
+ if (Compare-Object $expected $actual) { throw 'PSC package file inventory differs' }
248
+ foreach ($row in $manifest.files.PSObject.Properties) {
249
+ if ($row.Name -match '(^/|(^|/)\.\.(/|$)|:|\\)') { throw 'Unsafe package member' }
250
+ if ((Get-FileHash -LiteralPath (Join-Path $PSScriptRoot $row.Name) -Algorithm SHA256).Hash.ToLowerInvariant() -ne $row.Value) {
251
+ throw "PSC payload hash differs: $($row.Name)"
252
+ }
253
+ }
254
+ $tree = Get-ChildItem -LiteralPath $base -Directory -Force -ErrorAction SilentlyContinue |
255
+ Where-Object { $_.Name -match "^$([regex]::Escape($name))(-r[0-9a-f]{8})?$" -and (Test-Tree $_.FullName) } |
256
+ Select-Object -First 1 -ExpandProperty FullName
257
+ if ($tree) { Write-Host "Reusing verified PSC tree $tree" }
258
+ else { $tree = Publish-Tree; Write-Host "Installed PSC tree $tree" }
259
+ # Native preflight creates private state without changing existing state ACLs.
260
+ foreach ($root in @("$localAppData\PocketShell\pocketshell-client", "$localAppData\PocketShell\pocketshell-client-account", "$localAppData\PocketShell\pocketshell-client-runtime")) {
261
+ Invoke-Security $tree @{version=1; op='preflight'; root=$root}
262
+ }
263
+ foreach ($path in @("$tree\node.exe", "$tree\psc\dist\cli.js", "$tree\ssh.exe")) {
264
+ Invoke-Security $tree @{version=1; op='check-executable'; root=$tree; path=$path}
265
+ }
266
+ & "$tree\node.exe" "$tree\psc\dist\cli.js" --version
267
+ if ($LASTEXITCODE -ne 0) { throw 'PSC installed version check failed' }
268
+ & "$tree\node.exe" "$tree\psc\dist\cli.js" hosts
269
+ if ($LASTEXITCODE -ne 0) { throw 'PSC installed hosts check failed' }
270
+ Set-Shim $tree
271
+ Update-UserPath
272
+ Remove-Superseded $tree $previous
273
+ Write-Host "PSC installed. Open a new terminal, then run psc login and psc hosts sync. Shim: $shim"
274
+ exit 0
275
+ } catch {
276
+ $reason = $_.Exception.Message
277
+ if ($previous -and (Get-ActiveTree) -eq $previous) {
278
+ Write-Warning "PSC $($manifest.version) was not activated ($reason). The previous PSC stays active: $previous"
279
+ exit 3
280
+ }
281
+ Write-Error "PSC installation failed: $reason" -ErrorAction Continue
282
+ exit 1
283
+ }
@@ -42,8 +42,15 @@ Section "PocketShell Gateway"
42
42
  Pop $3
43
43
  FileOpen $4 "$INSTDIR\psc-install.log" w
44
44
  FileWrite $4 "$3"
45
+ FileWrite $4 "$\r$\nPSC installer exit code: $2$\r$\n"
45
46
  FileClose $4
47
+ ; 0: this PSC is active. 3: recoverable, the previous working PSC stays
48
+ ; active; a logged warning, never a failure dialog. Anything else: no PSC.
46
49
  StrCmp $2 0 psc_continue
50
+ StrCmp $2 3 0 psc_failed
51
+ DetailPrint "PSC was not upgraded; the previous PSC stays active. See $INSTDIR\psc-install.log"
52
+ Goto psc_continue
53
+ psc_failed:
47
54
  MessageBox MB_ICONEXCLAMATION "PSC installation failed. Gateway installation will continue. Check $INSTDIR\psc-install.log for details. Exit code: $2" /SD IDOK
48
55
  psc_continue:
49
56
  WriteUninstaller "$INSTDIR\Uninstall.exe"
@@ -54,6 +61,7 @@ Section "PocketShell Gateway"
54
61
  CreateShortcut "$0\Microsoft\Windows\Start Menu\Programs\PocketShell Gateway\PocketShell Gateway.lnk" "$INSTDIR\runtime\GatewayTray.exe"
55
62
  CreateShortcut "$0\Microsoft\Windows\Start Menu\Programs\PocketShell Gateway\Gateway Setup.lnk" "$INSTDIR\runtime\GatewayTray.exe" "--setup"
56
63
  StrCmp $2 0 psc_shortcut
64
+ StrCmp $2 3 psc_shortcut
57
65
  Delete "$0\Microsoft\Windows\Start Menu\Programs\PocketShell Gateway\PSC Terminal.lnk"
58
66
  Goto psc_shortcut_done
59
67
  psc_shortcut:
@@ -1,3 +1,4 @@
1
+ import hashlib
1
2
  import importlib.util
2
3
  import json
3
4
  import os
@@ -54,19 +55,81 @@ def test_offline_client_is_pinned_and_does_not_ship_a_server(tmp_path, monkeypat
54
55
  assert result["sshSHA256"] == builder.digest(tmp_path / "client/ssh.exe")
55
56
 
56
57
 
57
- def test_offline_psc_preserves_previous_version_and_recatalogs_installer(tmp_path):
58
+ UPSTREAM_PSC_INSTALL = b"# stand-in for the reviewed upstream install.ps1\n"
59
+
60
+
61
+ @pytest.fixture
62
+ def upstream_pin(monkeypatch):
63
+ monkeypatch.setattr(builder, "UPSTREAM_PSC_INSTALL_SHA256", hashlib.sha256(UPSTREAM_PSC_INSTALL).hexdigest())
64
+
65
+
66
+ def test_offline_psc_installs_the_tray_installer_and_recatalogs_it(tmp_path, upstream_pin):
58
67
  script = tmp_path / "install.ps1"
59
- script.write_text('param([string]$SshPath = "$env:SystemRoot\\System32\\OpenSSH\\ssh.exe")\n'
60
- '$dest = "$base\\$($manifest.version)"\nSet-Acl -LiteralPath $Path -AclObject $acl\n')
68
+ script.write_bytes(UPSTREAM_PSC_INSTALL)
61
69
  manifest = tmp_path / "package-manifest.json"
62
70
  manifest.write_text(json.dumps({"files": {"install.ps1": "before"}}))
63
- builder.configure_offline_psc(tmp_path)
64
- assert "$($manifest.version)-$InstallVariant" in script.read_text()
65
- assert "System32\\OpenSSH" not in script.read_text()
66
- assert '$item.SetAccessControl($acl)' in script.read_text()
71
+ content_id = builder.configure_offline_psc(tmp_path, "ab" * 32)
72
+ text = script.read_text()
73
+ assert f"$ContentId = '{content_id}'" in text and "@CONTENT_ID@" not in text
74
+ assert text == builder.PSC_INSTALL_TEMPLATE.read_text().replace("@CONTENT_ID@", content_id)
67
75
  assert json.loads(manifest.read_text())["files"]["install.ps1"] == builder.digest(script)
76
+ # A second adaptation sees a changed upstream script and refuses.
68
77
  with pytest.raises(ValueError, match="review"):
69
- builder.configure_offline_psc(tmp_path)
78
+ builder.configure_offline_psc(tmp_path, "ab" * 32)
79
+
80
+
81
+ def test_upstream_psc_install_pin_is_the_reviewed_client_script():
82
+ assert builder.UPSTREAM_PSC_INSTALL_SHA256 == "f22200ddc623459c1a6bb522438ee241aa3367459020a774c8fd6b1abf8542e3"
83
+
84
+
85
+ def test_psc_installer_template_keeps_the_upgrade_contract():
86
+ text = builder.PSC_INSTALL_TEMPLATE.read_text()
87
+ assert text.isascii() # PowerShell 5 reads BOM-less scripts as ANSI
88
+ # content-addressed tree, staged then published by rename, shim switched last
89
+ assert '$name = "$($manifest.version)-$InstallVariant-$ContentId"' in text
90
+ assert "Rename-Item -LiteralPath $stage" in text and "[IO.File]::Replace($next, $shim, [NullString]::Value)" in text
91
+ assert text.index("Set-Shim $tree") > text.index('cli.js" hosts')
92
+ # recoverable: the previous PSC stays active -> exit 3, never a failure
93
+ assert "exit 3" in text and "Existing PSC version differs" not in text
94
+ # OS folders, not the caller's environment (SSH sessions lack SystemRoot)
95
+ assert "[Environment]::GetFolderPath('Windows')" in text and "$env:SystemRoot" not in text
96
+
97
+
98
+ def test_nsis_treats_a_kept_previous_psc_as_a_warning():
99
+ nsi = (builder.REPO / "scripts/release/tray-installer.nsi").read_text()
100
+ assert "StrCmp $2 3 0 psc_failed" in nsi and "StrCmp $2 3 psc_shortcut" in nsi
101
+ warning = nsi[nsi.index("StrCmp $2 3 0 psc_failed"):nsi.index("psc_failed:")]
102
+ assert "MessageBox" not in warning
103
+
104
+
105
+ def adapted_tree(tmp_path, name, files, ssh="ab" * 32):
106
+ root = tmp_path / name
107
+ root.mkdir()
108
+ (root / "install.ps1").write_bytes(UPSTREAM_PSC_INSTALL)
109
+ (root / "package-manifest.json").write_text(json.dumps({"version": "0.6.2", "files": files}))
110
+ return builder.configure_offline_psc(root, ssh)
111
+
112
+
113
+ def test_psc_same_version_with_different_content_gets_a_fresh_version_tree(tmp_path, upstream_pin):
114
+ # Regression: v0.5.10 over v0.5.9 on a laptop. Both shipped PSC 0.6.2 with
115
+ # a rebuilt previewStyle.js, the shared `<version>-gateway-ssh10` tree
116
+ # failed install.ps1's identical-reinstall check, and PSC was not upgraded.
117
+ old = {"install.ps1": "x", "psc/dist/cli.js": "1" * 64,
118
+ "psc/node_modules/@pocketshell/core/dist/esm/preview/previewStyle.js": "2" * 64}
119
+ rebuilt = dict(old, **{"psc/node_modules/@pocketshell/core/dist/esm/preview/previewStyle.js": "3" * 64})
120
+ assert adapted_tree(tmp_path, "a", old) != adapted_tree(tmp_path, "b", rebuilt)
121
+
122
+
123
+ def test_psc_identical_package_reinstalls_into_its_existing_tree(tmp_path, upstream_pin):
124
+ files = {"install.ps1": "x", "psc/dist/cli.js": "1" * 64}
125
+ # A changed adapter script alone does not move the tree: install.ps1 is never installed.
126
+ assert adapted_tree(tmp_path, "a", files) == adapted_tree(tmp_path, "b", dict(files, **{"install.ps1": "y"}))
127
+
128
+
129
+ def test_psc_changed_ssh_client_gets_a_fresh_version_tree(tmp_path, upstream_pin):
130
+ # ssh.exe is copied into the tree and its digest is bound, so it must move the tree too.
131
+ files = {"install.ps1": "x", "psc/dist/cli.js": "1" * 64}
132
+ assert adapted_tree(tmp_path, "a", files, "ab" * 32) != adapted_tree(tmp_path, "b", files, "cd" * 32)
70
133
 
71
134
 
72
135
  def test_catalog_rejects_tampered_or_extra_payload(tmp_path):