phiward 0.2.0b1__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 (187) hide show
  1. phiward-0.2.0b1/CHANGELOG.md +49 -0
  2. phiward-0.2.0b1/LICENSE +662 -0
  3. phiward-0.2.0b1/MANIFEST.in +6 -0
  4. phiward-0.2.0b1/NOTICE +16 -0
  5. phiward-0.2.0b1/PKG-INFO +147 -0
  6. phiward-0.2.0b1/README.md +114 -0
  7. phiward-0.2.0b1/docs/configuration.md +527 -0
  8. phiward-0.2.0b1/docs/daily-use.md +228 -0
  9. phiward-0.2.0b1/docs/developer.md +199 -0
  10. phiward-0.2.0b1/docs/glossary.md +72 -0
  11. phiward-0.2.0b1/docs/hpc.md +302 -0
  12. phiward-0.2.0b1/docs/index.md +36 -0
  13. phiward-0.2.0b1/docs/launch.md +187 -0
  14. phiward-0.2.0b1/docs/modes.md +202 -0
  15. phiward-0.2.0b1/docs/plugins.md +126 -0
  16. phiward-0.2.0b1/docs/quickstart.md +223 -0
  17. phiward-0.2.0b1/docs/release-notes/v0.2.0b1.md +83 -0
  18. phiward-0.2.0b1/docs/releasing.md +87 -0
  19. phiward-0.2.0b1/docs/setup.md +641 -0
  20. phiward-0.2.0b1/docs/stylesheets/extra.css +15 -0
  21. phiward-0.2.0b1/docs/threat-model.md +975 -0
  22. phiward-0.2.0b1/docs/unattended.md +237 -0
  23. phiward-0.2.0b1/docs/why.md +80 -0
  24. phiward-0.2.0b1/pyproject.toml +59 -0
  25. phiward-0.2.0b1/setup.cfg +4 -0
  26. phiward-0.2.0b1/src/phiward/__init__.py +8 -0
  27. phiward-0.2.0b1/src/phiward/__main__.py +5 -0
  28. phiward-0.2.0b1/src/phiward/_toml.py +211 -0
  29. phiward-0.2.0b1/src/phiward/adapters/__init__.py +105 -0
  30. phiward-0.2.0b1/src/phiward/adapters/claude.py +429 -0
  31. phiward-0.2.0b1/src/phiward/broker.py +831 -0
  32. phiward-0.2.0b1/src/phiward/carryover.py +1613 -0
  33. phiward-0.2.0b1/src/phiward/claude_settings.py +1307 -0
  34. phiward-0.2.0b1/src/phiward/cli.py +110 -0
  35. phiward-0.2.0b1/src/phiward/config.py +936 -0
  36. phiward-0.2.0b1/src/phiward/confine.py +476 -0
  37. phiward-0.2.0b1/src/phiward/copying.py +533 -0
  38. phiward-0.2.0b1/src/phiward/core.py +105 -0
  39. phiward-0.2.0b1/src/phiward/data/agents-section.md +43 -0
  40. phiward-0.2.0b1/src/phiward/doctor.py +1132 -0
  41. phiward-0.2.0b1/src/phiward/fasthook.py +70 -0
  42. phiward-0.2.0b1/src/phiward/fsinfo.py +241 -0
  43. phiward-0.2.0b1/src/phiward/gateway.py +159 -0
  44. phiward-0.2.0b1/src/phiward/githooks.py +248 -0
  45. phiward-0.2.0b1/src/phiward/guards/__init__.py +0 -0
  46. phiward-0.2.0b1/src/phiward/guards/protected_paths.py +1138 -0
  47. phiward-0.2.0b1/src/phiward/hidden.py +281 -0
  48. phiward-0.2.0b1/src/phiward/init.py +155 -0
  49. phiward-0.2.0b1/src/phiward/install.py +828 -0
  50. phiward-0.2.0b1/src/phiward/inventory.py +173 -0
  51. phiward-0.2.0b1/src/phiward/mcp.py +186 -0
  52. phiward-0.2.0b1/src/phiward/mcp_config.py +1736 -0
  53. phiward-0.2.0b1/src/phiward/names.py +5 -0
  54. phiward-0.2.0b1/src/phiward/packs/dates.toml +17 -0
  55. phiward-0.2.0b1/src/phiward/packs/genomics.toml +51 -0
  56. phiward-0.2.0b1/src/phiward/packs/msk.toml +32 -0
  57. phiward-0.2.0b1/src/phiward/pathid.py +403 -0
  58. phiward-0.2.0b1/src/phiward/pathmatch.py +98 -0
  59. phiward-0.2.0b1/src/phiward/paths.py +942 -0
  60. phiward-0.2.0b1/src/phiward/pin.py +214 -0
  61. phiward-0.2.0b1/src/phiward/procinfo.py +73 -0
  62. phiward-0.2.0b1/src/phiward/remote.py +448 -0
  63. phiward-0.2.0b1/src/phiward/run.py +788 -0
  64. phiward-0.2.0b1/src/phiward/safeio.py +84 -0
  65. phiward-0.2.0b1/src/phiward/sanitize.py +691 -0
  66. phiward-0.2.0b1/src/phiward/selfcheck.py +1506 -0
  67. phiward-0.2.0b1/src/phiward/service.py +321 -0
  68. phiward-0.2.0b1/src/phiward/session_note.py +86 -0
  69. phiward-0.2.0b1/src/phiward/setup_cmd.py +886 -0
  70. phiward-0.2.0b1/src/phiward/shell.py +504 -0
  71. phiward-0.2.0b1/src/phiward/wholetool.py +1463 -0
  72. phiward-0.2.0b1/src/phiward.egg-info/PKG-INFO +147 -0
  73. phiward-0.2.0b1/src/phiward.egg-info/SOURCES.txt +185 -0
  74. phiward-0.2.0b1/src/phiward.egg-info/dependency_links.txt +1 -0
  75. phiward-0.2.0b1/src/phiward.egg-info/entry_points.txt +3 -0
  76. phiward-0.2.0b1/src/phiward.egg-info/top_level.txt +1 -0
  77. phiward-0.2.0b1/tests/README.md +48 -0
  78. phiward-0.2.0b1/tests/conftest.py +293 -0
  79. phiward-0.2.0b1/tests/constraints.txt +4 -0
  80. phiward-0.2.0b1/tests/expected_skips_darwin.txt +37 -0
  81. phiward-0.2.0b1/tests/expected_skips_linux.txt +81 -0
  82. phiward-0.2.0b1/tests/helpers.py +163 -0
  83. phiward-0.2.0b1/tests/probes/mcp_reader.py +43 -0
  84. phiward-0.2.0b1/tests/test_config.py +110 -0
  85. phiward-0.2.0b1/tests/test_confinement.py +195 -0
  86. phiward-0.2.0b1/tests/test_copy_and_adapter.py +203 -0
  87. phiward-0.2.0b1/tests/test_docs_links.py +79 -0
  88. phiward-0.2.0b1/tests/test_githooks.py +313 -0
  89. phiward-0.2.0b1/tests/test_harness.py +124 -0
  90. phiward-0.2.0b1/tests/test_install_and_sandbox.py +229 -0
  91. phiward-0.2.0b1/tests/test_protected_paths.py +362 -0
  92. phiward-0.2.0b1/tests/test_round2.py +402 -0
  93. phiward-0.2.0b1/tests/test_round3.py +254 -0
  94. phiward-0.2.0b1/tests/test_round4.py +426 -0
  95. phiward-0.2.0b1/tests/test_round5.py +257 -0
  96. phiward-0.2.0b1/tests/test_sandbox_check_judge.py +142 -0
  97. phiward-0.2.0b1/tests/test_sanitize.py +403 -0
  98. phiward-0.2.0b1/tests/test_v2_attacks.py +332 -0
  99. phiward-0.2.0b1/tests/test_v2_backups.py +89 -0
  100. phiward-0.2.0b1/tests/test_v2_beta.py +169 -0
  101. phiward-0.2.0b1/tests/test_v2_broker_path_writable.py +59 -0
  102. phiward-0.2.0b1/tests/test_v2_carryover.py +310 -0
  103. phiward-0.2.0b1/tests/test_v2_dates.py +26 -0
  104. phiward-0.2.0b1/tests/test_v2_doctor_first.py +112 -0
  105. phiward-0.2.0b1/tests/test_v2_entry_id.py +129 -0
  106. phiward-0.2.0b1/tests/test_v2_fault_place.py +153 -0
  107. phiward-0.2.0b1/tests/test_v2_final_review.py +1033 -0
  108. phiward-0.2.0b1/tests/test_v2_full_check.py +373 -0
  109. phiward-0.2.0b1/tests/test_v2_fuzz.py +141 -0
  110. phiward-0.2.0b1/tests/test_v2_github_ci.py +151 -0
  111. phiward-0.2.0b1/tests/test_v2_glob_cases.py +557 -0
  112. phiward-0.2.0b1/tests/test_v2_hidden.py +108 -0
  113. phiward-0.2.0b1/tests/test_v2_launch_records.py +263 -0
  114. phiward-0.2.0b1/tests/test_v2_launch_settings.py +187 -0
  115. phiward-0.2.0b1/tests/test_v2_launcher_identity.py +115 -0
  116. phiward-0.2.0b1/tests/test_v2_launcher_owner.py +344 -0
  117. phiward-0.2.0b1/tests/test_v2_launcher_path.py +130 -0
  118. phiward-0.2.0b1/tests/test_v2_mcp_source.py +265 -0
  119. phiward-0.2.0b1/tests/test_v2_mcp_wrap.py +60 -0
  120. phiward-0.2.0b1/tests/test_v2_mcp_wrap_cmd.py +184 -0
  121. phiward-0.2.0b1/tests/test_v2_modes.py +231 -0
  122. phiward-0.2.0b1/tests/test_v2_network.py +202 -0
  123. phiward-0.2.0b1/tests/test_v2_note_service.py +199 -0
  124. phiward-0.2.0b1/tests/test_v2_old_settings.py +101 -0
  125. phiward-0.2.0b1/tests/test_v2_onboard.py +264 -0
  126. phiward-0.2.0b1/tests/test_v2_one_answer.py +233 -0
  127. phiward-0.2.0b1/tests/test_v2_one_rule.py +455 -0
  128. phiward-0.2.0b1/tests/test_v2_one_wrapped.py +116 -0
  129. phiward-0.2.0b1/tests/test_v2_p0a.py +278 -0
  130. phiward-0.2.0b1/tests/test_v2_p0a2.py +183 -0
  131. phiward-0.2.0b1/tests/test_v2_p0a3.py +159 -0
  132. phiward-0.2.0b1/tests/test_v2_p0a4.py +164 -0
  133. phiward-0.2.0b1/tests/test_v2_part2.py +93 -0
  134. phiward-0.2.0b1/tests/test_v2_part3.py +33 -0
  135. phiward-0.2.0b1/tests/test_v2_part6.py +55 -0
  136. phiward-0.2.0b1/tests/test_v2_path_risk.py +80 -0
  137. phiward-0.2.0b1/tests/test_v2_probe_bugs.py +144 -0
  138. phiward-0.2.0b1/tests/test_v2_properties.py +105 -0
  139. phiward-0.2.0b1/tests/test_v2_push.py +389 -0
  140. phiward-0.2.0b1/tests/test_v2_python_reads.py +100 -0
  141. phiward-0.2.0b1/tests/test_v2_r1.py +174 -0
  142. phiward-0.2.0b1/tests/test_v2_r1b.py +179 -0
  143. phiward-0.2.0b1/tests/test_v2_reason_steps.py +167 -0
  144. phiward-0.2.0b1/tests/test_v2_records_place.py +143 -0
  145. phiward-0.2.0b1/tests/test_v2_refusal_words.py +88 -0
  146. phiward-0.2.0b1/tests/test_v2_release10.py +85 -0
  147. phiward-0.2.0b1/tests/test_v2_release11.py +96 -0
  148. phiward-0.2.0b1/tests/test_v2_release12.py +189 -0
  149. phiward-0.2.0b1/tests/test_v2_release13.py +109 -0
  150. phiward-0.2.0b1/tests/test_v2_release14.py +919 -0
  151. phiward-0.2.0b1/tests/test_v2_release16.py +73 -0
  152. phiward-0.2.0b1/tests/test_v2_release18.py +920 -0
  153. phiward-0.2.0b1/tests/test_v2_release18d.py +269 -0
  154. phiward-0.2.0b1/tests/test_v2_release18f.py +500 -0
  155. phiward-0.2.0b1/tests/test_v2_release8.py +213 -0
  156. phiward-0.2.0b1/tests/test_v2_release9.py +148 -0
  157. phiward-0.2.0b1/tests/test_v2_release_review.py +1345 -0
  158. phiward-0.2.0b1/tests/test_v2_remote.py +222 -0
  159. phiward-0.2.0b1/tests/test_v2_rename.py +52 -0
  160. phiward-0.2.0b1/tests/test_v2_review_final.py +201 -0
  161. phiward-0.2.0b1/tests/test_v2_review_round3.py +250 -0
  162. phiward-0.2.0b1/tests/test_v2_review_round4.py +331 -0
  163. phiward-0.2.0b1/tests/test_v2_round10.py +131 -0
  164. phiward-0.2.0b1/tests/test_v2_round11.py +129 -0
  165. phiward-0.2.0b1/tests/test_v2_round12.py +88 -0
  166. phiward-0.2.0b1/tests/test_v2_round13.py +91 -0
  167. phiward-0.2.0b1/tests/test_v2_round14.py +83 -0
  168. phiward-0.2.0b1/tests/test_v2_round15.py +59 -0
  169. phiward-0.2.0b1/tests/test_v2_round16.py +149 -0
  170. phiward-0.2.0b1/tests/test_v2_round17.py +104 -0
  171. phiward-0.2.0b1/tests/test_v2_round7.py +298 -0
  172. phiward-0.2.0b1/tests/test_v2_round8.py +266 -0
  173. phiward-0.2.0b1/tests/test_v2_round9.py +217 -0
  174. phiward-0.2.0b1/tests/test_v2_s17.py +399 -0
  175. phiward-0.2.0b1/tests/test_v2_sandbox_boundary.py +105 -0
  176. phiward-0.2.0b1/tests/test_v2_selfcheck.py +169 -0
  177. phiward-0.2.0b1/tests/test_v2_shell_names.py +96 -0
  178. phiward-0.2.0b1/tests/test_v2_speed.py +106 -0
  179. phiward-0.2.0b1/tests/test_v2_steps_match_install.py +135 -0
  180. phiward-0.2.0b1/tests/test_v2_tool_rule.py +483 -0
  181. phiward-0.2.0b1/tests/test_v2_twin_count.py +99 -0
  182. phiward-0.2.0b1/tests/test_v2_unattended.py +469 -0
  183. phiward-0.2.0b1/tests/test_v2_usability.py +92 -0
  184. phiward-0.2.0b1/tests/test_v2_view.py +237 -0
  185. phiward-0.2.0b1/tests/test_v2_w1.py +173 -0
  186. phiward-0.2.0b1/tests/test_v2_w1b.py +282 -0
  187. phiward-0.2.0b1/tests/test_v2_wrap_shared.py +96 -0
@@ -0,0 +1,49 @@
1
+ # Changelog
2
+
3
+ All notable changes to phiward. Dates are UTC. Versions follow semantic versioning; until
4
+ 1.0, a minor version may change behaviour.
5
+
6
+ ## [0.2.0b1] - 2026-11-18 (beta)
7
+
8
+ The first public release. phiward keeps protected data (for example patient data) out of what
9
+ an AI coding agent sends to its model provider. Read
10
+ [docs/threat-model.md](docs/threat-model.md) before you rely on it, and
11
+ [docs/release-notes/v0.2.0b1.md](docs/release-notes/v0.2.0b1.md) for what is tested.
12
+
13
+ ### Added
14
+ - **Mode A**, a Claude Code session wired by `phiward install claude --user --write`: a hook
15
+ on every tool, Claude Code's sandbox settings and permission rules for the protected roots
16
+ and patterns, credentials and histories (the hidden list), and the files that run later
17
+ (settings, skills, hooks, git's control files, editor settings).
18
+ - **Mode B**, `phiward launch`: the whole agent tool in a kernel profile (macOS Seatbelt,
19
+ Linux bubblewrap), with stateless carry-over and quarantine (`phiward carryover`).
20
+ - **The gateway**: `phiward run -- CMD` and `phiward copy` run through a broker outside the
21
+ agent, in a kernel profile, and print masked output (protected paths, entry names,
22
+ identifiers). `[broker] commands` limits the programs; grants for write places and the
23
+ network come from the user config only.
24
+ - **MCP servers**: `phiward mcp list|wrap|unwrap` runs a local server in the kernel profile; the
25
+ hook trusts a wrapped server only while it runs so, with the profile the hook would build.
26
+ - **HPC** through your own shared SSH connection: `phiward run --remote HOST -- CMD`, and
27
+ copies to and from approved remotes.
28
+ - **Setup and checks**: `phiward setup` (profiles, a results folder, a program list, the login
29
+ service), `phiward init` for a project, `phiward doctor` (also `--headless` for unattended
30
+ agents), the Claude Code plugin (`/phiward:setup`) and a start-of-session note.
31
+ - **Sanitizer packs** (`genomics`, `dates`, and an example institution pack) and your own
32
+ names files and patterns.
33
+
34
+ ### Upgrading from agent-guards (a private pre-release)
35
+ Uninstall agent-guards, install phiward, move `~/.config/agent-guards` to
36
+ `~/.config/phiward` (and a repo's `.agent-guards.toml` to `.phiward.toml`), then run
37
+ `phiward setup` (choice 1), `phiward mcp list` and `phiward doctor`. The `agent-guards` command
38
+ stays as an alias during the beta.
39
+
40
+ ### Limits
41
+ What phiward does not protect, and every known gap, is in
42
+ [docs/threat-model.md](docs/threat-model.md).
43
+ - Out of the box, masking inside file contents covers only sequence and alignment file names,
44
+ read names and loci (the `genomics` pack). Subject and sample identifiers inside files are
45
+ masked only with a pack that has them (the `msk` example), your own `[sanitize] patterns` or
46
+ `names_from`. The gateway masks entry names under the protected roots (4 characters or
47
+ longer). Planned for 0.2.0b2: setup asks, doctor warns, and the output says what was masked
48
+ ([#3](https://github.com/msk-access/phiward/issues/3),
49
+ [#5](https://github.com/msk-access/phiward/issues/5)).