interlockd 0.1.4__tar.gz → 0.1.6__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 (273) hide show
  1. {interlockd-0.1.4 → interlockd-0.1.6}/.github/workflows/ci.yml +4 -0
  2. {interlockd-0.1.4 → interlockd-0.1.6}/.github/workflows/release.yml +34 -6
  3. {interlockd-0.1.4 → interlockd-0.1.6}/.gitignore +3 -0
  4. {interlockd-0.1.4 → interlockd-0.1.6}/CHANGELOG.md +11 -0
  5. interlockd-0.1.6/CLAUDE.md +30 -0
  6. {interlockd-0.1.4 → interlockd-0.1.6}/PKG-INFO +6 -4
  7. {interlockd-0.1.4 → interlockd-0.1.6}/README.md +4 -3
  8. {interlockd-0.1.4 → interlockd-0.1.6}/SECURITY.md +3 -0
  9. {interlockd-0.1.4 → interlockd-0.1.6}/docs/ADAPTERS.md +3 -1
  10. {interlockd-0.1.4 → interlockd-0.1.6}/docs/GETTING-STARTED.md +2 -2
  11. {interlockd-0.1.4 → interlockd-0.1.6}/docs/USER-GUIDE.md +11 -3
  12. interlockd-0.1.6/examples/aws/interlock-audit.yaml +70 -0
  13. {interlockd-0.1.4 → interlockd-0.1.6}/examples/github-workflow.yml +1 -1
  14. {interlockd-0.1.4 → interlockd-0.1.6}/interlockd/__init__.py +1 -1
  15. {interlockd-0.1.4 → interlockd-0.1.6}/interlockd/bench.py +13 -2
  16. {interlockd-0.1.4 → interlockd-0.1.6}/interlockd/capture.py +4 -1
  17. {interlockd-0.1.4 → interlockd-0.1.6}/interlockd/cli.py +69 -31
  18. {interlockd-0.1.4 → interlockd-0.1.6}/interlockd/insights.py +11 -7
  19. {interlockd-0.1.4 → interlockd-0.1.6}/interlockd/mcp_proxy.py +5 -1
  20. {interlockd-0.1.4 → interlockd-0.1.6}/interlockd/onboard.py +7 -1
  21. interlockd-0.1.6/interlockd/plugin_api.py +186 -0
  22. {interlockd-0.1.4 → interlockd-0.1.6}/interlockd/plugins.py +14 -0
  23. {interlockd-0.1.4 → interlockd-0.1.6}/interlockd/service.py +60 -8
  24. {interlockd-0.1.4 → interlockd-0.1.6}/interlockd/shims/claude-code/interlock-hook.sh +1 -1
  25. {interlockd-0.1.4 → interlockd-0.1.6}/interlockd/shims/kiro/interlock-hook.mjs +1 -1
  26. {interlockd-0.1.4 → interlockd-0.1.6}/interlockd/shims/kiro/interlock-hook.sh +1 -1
  27. interlockd-0.1.6/interlockd/shims/py/interlock-hook.py +214 -0
  28. {interlockd-0.1.4 → interlockd-0.1.6}/pyproject.toml +2 -1
  29. interlockd-0.1.6/scripts/e2e-hooks.py +138 -0
  30. {interlockd-0.1.4 → interlockd-0.1.6}/sdk/js/package.json +1 -1
  31. {interlockd-0.1.4 → interlockd-0.1.6}/sdk/js/src/index.js +1 -1
  32. {interlockd-0.1.4 → interlockd-0.1.6}/tests/conftest.py +16 -10
  33. {interlockd-0.1.4 → interlockd-0.1.6}/tests/test_claude_code.py +5 -3
  34. {interlockd-0.1.4 → interlockd-0.1.6}/tests/test_cursor_gemini.py +4 -2
  35. {interlockd-0.1.4 → interlockd-0.1.6}/tests/test_insights.py +5 -2
  36. {interlockd-0.1.4 → interlockd-0.1.6}/tests/test_more_adapters.py +15 -7
  37. {interlockd-0.1.4 → interlockd-0.1.6}/tests/test_onboard.py +15 -2
  38. interlockd-0.1.6/tests/test_plugin_api.py +121 -0
  39. interlockd-0.1.6/tests/test_service_windows.py +55 -0
  40. interlockd-0.1.6/tests/test_shim_py.py +142 -0
  41. {interlockd-0.1.4 → interlockd-0.1.6}/tests/test_version.py +1 -1
  42. {interlockd-0.1.4 → interlockd-0.1.6}/.github/CODEOWNERS +0 -0
  43. {interlockd-0.1.4 → interlockd-0.1.6}/.github/ISSUE_TEMPLATE/agent.yml +0 -0
  44. {interlockd-0.1.4 → interlockd-0.1.6}/.github/ISSUE_TEMPLATE/bug.yml +0 -0
  45. {interlockd-0.1.4 → interlockd-0.1.6}/.github/ISSUE_TEMPLATE/config.yml +0 -0
  46. {interlockd-0.1.4 → interlockd-0.1.6}/.github/ISSUE_TEMPLATE/decision.yml +0 -0
  47. {interlockd-0.1.4 → interlockd-0.1.6}/.github/dependabot.yml +0 -0
  48. {interlockd-0.1.4 → interlockd-0.1.6}/.github/pull_request_template.md +0 -0
  49. {interlockd-0.1.4 → interlockd-0.1.6}/CODE_OF_CONDUCT.md +0 -0
  50. {interlockd-0.1.4 → interlockd-0.1.6}/CONTRIBUTING.md +0 -0
  51. {interlockd-0.1.4 → interlockd-0.1.6}/LICENSE +0 -0
  52. {interlockd-0.1.4 → interlockd-0.1.6}/NOTICE +0 -0
  53. {interlockd-0.1.4 → interlockd-0.1.6}/action.yml +0 -0
  54. {interlockd-0.1.4 → interlockd-0.1.6}/adapters/README.md +0 -0
  55. {interlockd-0.1.4 → interlockd-0.1.6}/adapters/antigravity/PAYLOADS.md +0 -0
  56. {interlockd-0.1.4 → interlockd-0.1.6}/adapters/claude-code/PAYLOADS.md +0 -0
  57. {interlockd-0.1.4 → interlockd-0.1.6}/adapters/claude-code/README.md +0 -0
  58. {interlockd-0.1.4 → interlockd-0.1.6}/adapters/codex/PAYLOADS.md +0 -0
  59. {interlockd-0.1.4 → interlockd-0.1.6}/adapters/codex/README.md +0 -0
  60. {interlockd-0.1.4 → interlockd-0.1.6}/adapters/copilot-cli/PAYLOADS.md +0 -0
  61. {interlockd-0.1.4 → interlockd-0.1.6}/adapters/cursor/PAYLOADS.md +0 -0
  62. {interlockd-0.1.4 → interlockd-0.1.6}/adapters/gemini-cli/PAYLOADS.md +0 -0
  63. {interlockd-0.1.4 → interlockd-0.1.6}/adapters/kiro/PAYLOADS.md +0 -0
  64. {interlockd-0.1.4 → interlockd-0.1.6}/adapters/opencode/PAYLOADS.md +0 -0
  65. {interlockd-0.1.4 → interlockd-0.1.6}/adapters/windsurf/PAYLOADS.md +0 -0
  66. {interlockd-0.1.4 → interlockd-0.1.6}/benchmarks/agentdojo_template.py +0 -0
  67. {interlockd-0.1.4 → interlockd-0.1.6}/benchmarks/injecagent.py +0 -0
  68. {interlockd-0.1.4 → interlockd-0.1.6}/benchmarks/nl2bash.py +0 -0
  69. {interlockd-0.1.4 → interlockd-0.1.6}/corpus/README.md +0 -0
  70. {interlockd-0.1.4 → interlockd-0.1.6}/corpus/_corpus.yaml +0 -0
  71. {interlockd-0.1.4 → interlockd-0.1.6}/corpus/archetypes/_corpus.yaml +0 -0
  72. {interlockd-0.1.4 → interlockd-0.1.6}/corpus/archetypes/exfil_and_secrets.jsonl +0 -0
  73. {interlockd-0.1.4 → interlockd-0.1.6}/corpus/archetypes/git_and_history.jsonl +0 -0
  74. {interlockd-0.1.4 → interlockd-0.1.6}/corpus/archetypes/injection_persistence_supplychain.jsonl +0 -0
  75. {interlockd-0.1.4 → interlockd-0.1.6}/corpus/archetypes/judge_confirmation.jsonl +0 -0
  76. {interlockd-0.1.4 → interlockd-0.1.6}/corpus/archetypes/judge_exfil.jsonl +0 -0
  77. {interlockd-0.1.4 → interlockd-0.1.6}/corpus/archetypes/judge_injection.jsonl +0 -0
  78. {interlockd-0.1.4 → interlockd-0.1.6}/corpus/archetypes/judge_intent.jsonl +0 -0
  79. {interlockd-0.1.4 → interlockd-0.1.6}/corpus/archetypes/slow_hijack.jsonl +0 -0
  80. {interlockd-0.1.4 → interlockd-0.1.6}/corpus/external/README.md +0 -0
  81. {interlockd-0.1.4 → interlockd-0.1.6}/corpus/external/samples/agentdojo.sample.json +0 -0
  82. {interlockd-0.1.4 → interlockd-0.1.6}/corpus/external/samples/agentdrift.sample.json +0 -0
  83. {interlockd-0.1.4 → interlockd-0.1.6}/corpus/external/samples/injecagent.sample.json +0 -0
  84. {interlockd-0.1.4 → interlockd-0.1.6}/corpus/ogr-seed-v0/README.md +0 -0
  85. {interlockd-0.1.4 → interlockd-0.1.6}/corpus/ogr-seed-v0/seed-v0.jsonl +0 -0
  86. {interlockd-0.1.4 → interlockd-0.1.6}/demo/demo.sh +0 -0
  87. {interlockd-0.1.4 → interlockd-0.1.6}/demo/demo.tape +0 -0
  88. {interlockd-0.1.4 → interlockd-0.1.6}/docs/BENCHMARKS.md +0 -0
  89. {interlockd-0.1.4 → interlockd-0.1.6}/docs/PERFORMANCE.md +0 -0
  90. {interlockd-0.1.4 → interlockd-0.1.6}/docs/THREAT-MODEL.md +0 -0
  91. {interlockd-0.1.4 → interlockd-0.1.6}/docs/mandate-example.cedar +0 -0
  92. {interlockd-0.1.4 → interlockd-0.1.6}/docs/policy-example.yaml +0 -0
  93. {interlockd-0.1.4 → interlockd-0.1.6}/docs/reports/M3-judge-calibration.md +0 -0
  94. {interlockd-0.1.4 → interlockd-0.1.6}/docs/reports/ogr-seed-v0-results.jsonl +0 -0
  95. {interlockd-0.1.4 → interlockd-0.1.6}/docs/reports/ogr-seed-v0-results.md +0 -0
  96. {interlockd-0.1.4 → interlockd-0.1.6}/examples/agents/README.md +0 -0
  97. {interlockd-0.1.4 → interlockd-0.1.6}/examples/agents/claude_agent_sdk_agent.py +0 -0
  98. {interlockd-0.1.4 → interlockd-0.1.6}/examples/agents/crewai_crew.py +0 -0
  99. {interlockd-0.1.4 → interlockd-0.1.6}/examples/agents/google_adk_agent.py +0 -0
  100. {interlockd-0.1.4 → interlockd-0.1.6}/examples/agents/langgraph_agent.py +0 -0
  101. {interlockd-0.1.4 → interlockd-0.1.6}/examples/agents/openai_agents.py +0 -0
  102. {interlockd-0.1.4 → interlockd-0.1.6}/examples/agents/semantic_kernel_agent.py +0 -0
  103. {interlockd-0.1.4 → interlockd-0.1.6}/examples/agents/strands_agent.py +0 -0
  104. {interlockd-0.1.4 → interlockd-0.1.6}/examples/policies/ci.yaml +0 -0
  105. {interlockd-0.1.4 → interlockd-0.1.6}/examples/policies/mcp-locked-down.yaml +0 -0
  106. {interlockd-0.1.4 → interlockd-0.1.6}/examples/policies/strict-team.yaml +0 -0
  107. {interlockd-0.1.4 → interlockd-0.1.6}/interlockd/__main__.py +0 -0
  108. {interlockd-0.1.4 → interlockd-0.1.6}/interlockd/aibom.py +0 -0
  109. {interlockd-0.1.4 → interlockd-0.1.6}/interlockd/api.py +0 -0
  110. {interlockd-0.1.4 → interlockd-0.1.6}/interlockd/auth.py +0 -0
  111. {interlockd-0.1.4 → interlockd-0.1.6}/interlockd/calibration.py +0 -0
  112. {interlockd-0.1.4 → interlockd-0.1.6}/interlockd/compose.py +0 -0
  113. {interlockd-0.1.4 → interlockd-0.1.6}/interlockd/config.py +0 -0
  114. {interlockd-0.1.4 → interlockd-0.1.6}/interlockd/control.py +0 -0
  115. {interlockd-0.1.4 → interlockd-0.1.6}/interlockd/corpus.py +0 -0
  116. {interlockd-0.1.4 → interlockd-0.1.6}/interlockd/data/packs/_corpus.yaml +0 -0
  117. {interlockd-0.1.4 → interlockd-0.1.6}/interlockd/data/packs/egress.jsonl +0 -0
  118. {interlockd-0.1.4 → interlockd-0.1.6}/interlockd/data/packs/fileops.jsonl +0 -0
  119. {interlockd-0.1.4 → interlockd-0.1.6}/interlockd/data/packs/git.jsonl +0 -0
  120. {interlockd-0.1.4 → interlockd-0.1.6}/interlockd/data/packs/packages.jsonl +0 -0
  121. {interlockd-0.1.4 → interlockd-0.1.6}/interlockd/data/packs/persistence.jsonl +0 -0
  122. {interlockd-0.1.4 → interlockd-0.1.6}/interlockd/data/packs/secrets.jsonl +0 -0
  123. {interlockd-0.1.4 → interlockd-0.1.6}/interlockd/data/packs/shell.jsonl +0 -0
  124. {interlockd-0.1.4 → interlockd-0.1.6}/interlockd/det/__init__.py +0 -0
  125. {interlockd-0.1.4 → interlockd-0.1.6}/interlockd/det/describe.py +0 -0
  126. {interlockd-0.1.4 → interlockd-0.1.6}/interlockd/det/engine.py +0 -0
  127. {interlockd-0.1.4 → interlockd-0.1.6}/interlockd/det/flow.py +0 -0
  128. {interlockd-0.1.4 → interlockd-0.1.6}/interlockd/det/mandate.py +0 -0
  129. {interlockd-0.1.4 → interlockd-0.1.6}/interlockd/det/mcp.py +0 -0
  130. {interlockd-0.1.4 → interlockd-0.1.6}/interlockd/det/memory.py +0 -0
  131. {interlockd-0.1.4 → interlockd-0.1.6}/interlockd/det/oauth.py +0 -0
  132. {interlockd-0.1.4 → interlockd-0.1.6}/interlockd/det/packs.py +0 -0
  133. {interlockd-0.1.4 → interlockd-0.1.6}/interlockd/det/shellparse.py +0 -0
  134. {interlockd-0.1.4 → interlockd-0.1.6}/interlockd/egress.py +0 -0
  135. {interlockd-0.1.4 → interlockd-0.1.6}/interlockd/gateway.py +0 -0
  136. {interlockd-0.1.4 → interlockd-0.1.6}/interlockd/ids.py +0 -0
  137. {interlockd-0.1.4 → interlockd-0.1.6}/interlockd/integrations/__init__.py +0 -0
  138. {interlockd-0.1.4 → interlockd-0.1.6}/interlockd/integrations/claude_agent_sdk.py +0 -0
  139. {interlockd-0.1.4 → interlockd-0.1.6}/interlockd/integrations/client.py +0 -0
  140. {interlockd-0.1.4 → interlockd-0.1.6}/interlockd/integrations/crewai.py +0 -0
  141. {interlockd-0.1.4 → interlockd-0.1.6}/interlockd/integrations/google_adk.py +0 -0
  142. {interlockd-0.1.4 → interlockd-0.1.6}/interlockd/integrations/langchain.py +0 -0
  143. {interlockd-0.1.4 → interlockd-0.1.6}/interlockd/integrations/openai_agents.py +0 -0
  144. {interlockd-0.1.4 → interlockd-0.1.6}/interlockd/integrations/semantic_kernel.py +0 -0
  145. {interlockd-0.1.4 → interlockd-0.1.6}/interlockd/integrations/strands.py +0 -0
  146. {interlockd-0.1.4 → interlockd-0.1.6}/interlockd/judge_setup.py +0 -0
  147. {interlockd-0.1.4 → interlockd-0.1.6}/interlockd/judges/__init__.py +0 -0
  148. {interlockd-0.1.4 → interlockd-0.1.6}/interlockd/judges/guardrails.py +0 -0
  149. {interlockd-0.1.4 → interlockd-0.1.6}/interlockd/judges/local_probe.py +0 -0
  150. {interlockd-0.1.4 → interlockd-0.1.6}/interlockd/judges/projector.py +0 -0
  151. {interlockd-0.1.4 → interlockd-0.1.6}/interlockd/judges/strands_decider.py +0 -0
  152. {interlockd-0.1.4 → interlockd-0.1.6}/interlockd/ledger.py +0 -0
  153. {interlockd-0.1.4 → interlockd-0.1.6}/interlockd/mcp_http.py +0 -0
  154. {interlockd-0.1.4 → interlockd-0.1.6}/interlockd/mcp_server.py +0 -0
  155. {interlockd-0.1.4 → interlockd-0.1.6}/interlockd/models.py +0 -0
  156. {interlockd-0.1.4 → interlockd-0.1.6}/interlockd/normalize/__init__.py +0 -0
  157. {interlockd-0.1.4 → interlockd-0.1.6}/interlockd/normalize/claude_code.py +0 -0
  158. {interlockd-0.1.4 → interlockd-0.1.6}/interlockd/normalize/cursor.py +0 -0
  159. {interlockd-0.1.4 → interlockd-0.1.6}/interlockd/normalize/gemini_cli.py +0 -0
  160. {interlockd-0.1.4 → interlockd-0.1.6}/interlockd/normalize/kiro.py +0 -0
  161. {interlockd-0.1.4 → interlockd-0.1.6}/interlockd/normalize/more.py +0 -0
  162. {interlockd-0.1.4 → interlockd-0.1.6}/interlockd/ogr.py +0 -0
  163. {interlockd-0.1.4 → interlockd-0.1.6}/interlockd/otel.py +0 -0
  164. {interlockd-0.1.4 → interlockd-0.1.6}/interlockd/paths.py +0 -0
  165. {interlockd-0.1.4 → interlockd-0.1.6}/interlockd/pipeline.py +0 -0
  166. {interlockd-0.1.4 → interlockd-0.1.6}/interlockd/policy/__init__.py +0 -0
  167. {interlockd-0.1.4 → interlockd-0.1.6}/interlockd/policy/managed.py +0 -0
  168. {interlockd-0.1.4 → interlockd-0.1.6}/interlockd/policy/workspace.py +0 -0
  169. {interlockd-0.1.4 → interlockd-0.1.6}/interlockd/policy_lint.py +0 -0
  170. {interlockd-0.1.4 → interlockd-0.1.6}/interlockd/render.py +0 -0
  171. {interlockd-0.1.4 → interlockd-0.1.6}/interlockd/sandbox.py +0 -0
  172. {interlockd-0.1.4 → interlockd-0.1.6}/interlockd/scan.py +0 -0
  173. {interlockd-0.1.4 → interlockd-0.1.6}/interlockd/schema/verdict.schema.json +0 -0
  174. {interlockd-0.1.4 → interlockd-0.1.6}/interlockd/selftest.py +0 -0
  175. {interlockd-0.1.4 → interlockd-0.1.6}/interlockd/shims/opencode/interlock.js +0 -0
  176. {interlockd-0.1.4 → interlockd-0.1.6}/interlockd/store/__init__.py +0 -0
  177. {interlockd-0.1.4 → interlockd-0.1.6}/interlockd/store/drainer.py +0 -0
  178. {interlockd-0.1.4 → interlockd-0.1.6}/interlockd/store/dynamodb.py +0 -0
  179. {interlockd-0.1.4 → interlockd-0.1.6}/interlockd/store/memory.py +0 -0
  180. {interlockd-0.1.4 → interlockd-0.1.6}/interlockd/store/spool.py +0 -0
  181. {interlockd-0.1.4 → interlockd-0.1.6}/interlockd/testkit.py +0 -0
  182. {interlockd-0.1.4 → interlockd-0.1.6}/interlockd/tiers.py +0 -0
  183. {interlockd-0.1.4 → interlockd-0.1.6}/interlockd/transcript/__init__.py +0 -0
  184. {interlockd-0.1.4 → interlockd-0.1.6}/interlockd/transcript/claude_code.py +0 -0
  185. {interlockd-0.1.4 → interlockd-0.1.6}/interlockd/transcript/kiro.py +0 -0
  186. {interlockd-0.1.4 → interlockd-0.1.6}/interlockd/watch.py +0 -0
  187. {interlockd-0.1.4 → interlockd-0.1.6}/packaging/homebrew/Formula/interlock.rb +0 -0
  188. {interlockd-0.1.4 → interlockd-0.1.6}/packaging/homebrew/README.md +0 -0
  189. {interlockd-0.1.4 → interlockd-0.1.6}/packaging/homebrew/make_formula.py +0 -0
  190. {interlockd-0.1.4 → interlockd-0.1.6}/scripts/check-hygiene.sh +0 -0
  191. {interlockd-0.1.4 → interlockd-0.1.6}/sdk/js/README.md +0 -0
  192. {interlockd-0.1.4 → interlockd-0.1.6}/sdk/js/src/index.d.ts +0 -0
  193. {interlockd-0.1.4 → interlockd-0.1.6}/tests/fake_mcp_server.py +0 -0
  194. {interlockd-0.1.4 → interlockd-0.1.6}/tests/fixtures/claude-code/post-bash-inject.json +0 -0
  195. {interlockd-0.1.4 → interlockd-0.1.6}/tests/fixtures/claude-code/post-read-inject.json +0 -0
  196. {interlockd-0.1.4 → interlockd-0.1.6}/tests/fixtures/claude-code/pre-bash-block.json +0 -0
  197. {interlockd-0.1.4 → interlockd-0.1.6}/tests/fixtures/claude-code/pre-bash-inject.json +0 -0
  198. {interlockd-0.1.4 → interlockd-0.1.6}/tests/fixtures/codex/post-bash-benign.json +0 -0
  199. {interlockd-0.1.4 → interlockd-0.1.6}/tests/fixtures/codex/post-bash-inject.json +0 -0
  200. {interlockd-0.1.4 → interlockd-0.1.6}/tests/fixtures/codex/pre-bash-benign.json +0 -0
  201. {interlockd-0.1.4 → interlockd-0.1.6}/tests/fixtures/codex/pre-bash-block.json +0 -0
  202. {interlockd-0.1.4 → interlockd-0.1.6}/tests/fixtures/copilot-cli/post-bash-inject.json +0 -0
  203. {interlockd-0.1.4 → interlockd-0.1.6}/tests/fixtures/copilot-cli/pre-bash-benign.json +0 -0
  204. {interlockd-0.1.4 → interlockd-0.1.6}/tests/fixtures/copilot-cli/pre-bash-block.json +0 -0
  205. {interlockd-0.1.4 → interlockd-0.1.6}/tests/fixtures/cursor/post-read-benign.json +0 -0
  206. {interlockd-0.1.4 → interlockd-0.1.6}/tests/fixtures/cursor/post-shell-benign.json +0 -0
  207. {interlockd-0.1.4 → interlockd-0.1.6}/tests/fixtures/cursor/pre-read-benign.json +0 -0
  208. {interlockd-0.1.4 → interlockd-0.1.6}/tests/fixtures/cursor/pre-shell-benign.json +0 -0
  209. {interlockd-0.1.4 → interlockd-0.1.6}/tests/fixtures/cursor/pre-shell-block.json +0 -0
  210. {interlockd-0.1.4 → interlockd-0.1.6}/tests/fixtures/gemini-cli/post-read-benign.json +0 -0
  211. {interlockd-0.1.4 → interlockd-0.1.6}/tests/fixtures/gemini-cli/post-read-inject.json +0 -0
  212. {interlockd-0.1.4 → interlockd-0.1.6}/tests/fixtures/gemini-cli/post-shell-benign.json +0 -0
  213. {interlockd-0.1.4 → interlockd-0.1.6}/tests/fixtures/gemini-cli/post-shell-rot13-inject.json +0 -0
  214. {interlockd-0.1.4 → interlockd-0.1.6}/tests/fixtures/gemini-cli/pre-read-benign.json +0 -0
  215. {interlockd-0.1.4 → interlockd-0.1.6}/tests/fixtures/gemini-cli/pre-shell-benign.json +0 -0
  216. {interlockd-0.1.4 → interlockd-0.1.6}/tests/fixtures/gemini-cli/pre-shell-block.json +0 -0
  217. {interlockd-0.1.4 → interlockd-0.1.6}/tests/fixtures/windsurf/post-shell-benign.json +0 -0
  218. {interlockd-0.1.4 → interlockd-0.1.6}/tests/fixtures/windsurf/pre-shell-benign.json +0 -0
  219. {interlockd-0.1.4 → interlockd-0.1.6}/tests/fixtures/windsurf/pre-shell-block.json +0 -0
  220. {interlockd-0.1.4 → interlockd-0.1.6}/tests/test_aibom.py +0 -0
  221. {interlockd-0.1.4 → interlockd-0.1.6}/tests/test_api.py +0 -0
  222. {interlockd-0.1.4 → interlockd-0.1.6}/tests/test_audit_chain.py +0 -0
  223. {interlockd-0.1.4 → interlockd-0.1.6}/tests/test_bench.py +0 -0
  224. {interlockd-0.1.4 → interlockd-0.1.6}/tests/test_calibration.py +0 -0
  225. {interlockd-0.1.4 → interlockd-0.1.6}/tests/test_capture.py +0 -0
  226. {interlockd-0.1.4 → interlockd-0.1.6}/tests/test_claude_agent_sdk.py +0 -0
  227. {interlockd-0.1.4 → interlockd-0.1.6}/tests/test_control.py +0 -0
  228. {interlockd-0.1.4 → interlockd-0.1.6}/tests/test_corpus.py +0 -0
  229. {interlockd-0.1.4 → interlockd-0.1.6}/tests/test_crewai.py +0 -0
  230. {interlockd-0.1.4 → interlockd-0.1.6}/tests/test_dynamodb.py +0 -0
  231. {interlockd-0.1.4 → interlockd-0.1.6}/tests/test_egress.py +0 -0
  232. {interlockd-0.1.4 → interlockd-0.1.6}/tests/test_examples.py +0 -0
  233. {interlockd-0.1.4 → interlockd-0.1.6}/tests/test_flow.py +0 -0
  234. {interlockd-0.1.4 → interlockd-0.1.6}/tests/test_gateway.py +0 -0
  235. {interlockd-0.1.4 → interlockd-0.1.6}/tests/test_google_adk.py +0 -0
  236. {interlockd-0.1.4 → interlockd-0.1.6}/tests/test_homebrew_formula.py +0 -0
  237. {interlockd-0.1.4 → interlockd-0.1.6}/tests/test_interlock_test.py +0 -0
  238. {interlockd-0.1.4 → interlockd-0.1.6}/tests/test_js_sdk.py +0 -0
  239. {interlockd-0.1.4 → interlockd-0.1.6}/tests/test_judge.py +0 -0
  240. {interlockd-0.1.4 → interlockd-0.1.6}/tests/test_judge_setup.py +0 -0
  241. {interlockd-0.1.4 → interlockd-0.1.6}/tests/test_langchain.py +0 -0
  242. {interlockd-0.1.4 → interlockd-0.1.6}/tests/test_local_probe.py +0 -0
  243. {interlockd-0.1.4 → interlockd-0.1.6}/tests/test_managed_policy.py +0 -0
  244. {interlockd-0.1.4 → interlockd-0.1.6}/tests/test_mandate.py +0 -0
  245. {interlockd-0.1.4 → interlockd-0.1.6}/tests/test_mcp_http.py +0 -0
  246. {interlockd-0.1.4 → interlockd-0.1.6}/tests/test_mcp_oauth.py +0 -0
  247. {interlockd-0.1.4 → interlockd-0.1.6}/tests/test_mcp_policy.py +0 -0
  248. {interlockd-0.1.4 → interlockd-0.1.6}/tests/test_mcp_proxy.py +0 -0
  249. {interlockd-0.1.4 → interlockd-0.1.6}/tests/test_mcp_server.py +0 -0
  250. {interlockd-0.1.4 → interlockd-0.1.6}/tests/test_memory.py +0 -0
  251. {interlockd-0.1.4 → interlockd-0.1.6}/tests/test_normalize_kiro.py +0 -0
  252. {interlockd-0.1.4 → interlockd-0.1.6}/tests/test_ogr.py +0 -0
  253. {interlockd-0.1.4 → interlockd-0.1.6}/tests/test_openai_agents.py +0 -0
  254. {interlockd-0.1.4 → interlockd-0.1.6}/tests/test_opencode.py +0 -0
  255. {interlockd-0.1.4 → interlockd-0.1.6}/tests/test_otel.py +0 -0
  256. {interlockd-0.1.4 → interlockd-0.1.6}/tests/test_packs.py +0 -0
  257. {interlockd-0.1.4 → interlockd-0.1.6}/tests/test_paths_windows.py +0 -0
  258. {interlockd-0.1.4 → interlockd-0.1.6}/tests/test_pipeline.py +0 -0
  259. {interlockd-0.1.4 → interlockd-0.1.6}/tests/test_plugins.py +0 -0
  260. {interlockd-0.1.4 → interlockd-0.1.6}/tests/test_policy_lint.py +0 -0
  261. {interlockd-0.1.4 → interlockd-0.1.6}/tests/test_repo_policy.py +0 -0
  262. {interlockd-0.1.4 → interlockd-0.1.6}/tests/test_sandbox.py +0 -0
  263. {interlockd-0.1.4 → interlockd-0.1.6}/tests/test_scan.py +0 -0
  264. {interlockd-0.1.4 → interlockd-0.1.6}/tests/test_selftest.py +0 -0
  265. {interlockd-0.1.4 → interlockd-0.1.6}/tests/test_semantic_kernel.py +0 -0
  266. {interlockd-0.1.4 → interlockd-0.1.6}/tests/test_shim_sh.py +0 -0
  267. {interlockd-0.1.4 → interlockd-0.1.6}/tests/test_spool.py +0 -0
  268. {interlockd-0.1.4 → interlockd-0.1.6}/tests/test_strands.py +0 -0
  269. {interlockd-0.1.4 → interlockd-0.1.6}/tests/test_text_encoding.py +0 -0
  270. {interlockd-0.1.4 → interlockd-0.1.6}/tests/test_tiers.py +0 -0
  271. {interlockd-0.1.4 → interlockd-0.1.6}/tests/test_transcript.py +0 -0
  272. {interlockd-0.1.4 → interlockd-0.1.6}/tests/test_unix_socket.py +0 -0
  273. {interlockd-0.1.4 → interlockd-0.1.6}/tests/test_watch.py +0 -0
@@ -56,6 +56,10 @@ jobs:
56
56
  run: .venv/Scripts/python.exe -m pytest -q -p no:cacheprovider
57
57
  - name: Rule corpus gate
58
58
  run: .venv/Scripts/interlock.exe test
59
+ - name: Agent hooks on Windows (init, every installed hook through cmd.exe / PowerShell, uninstall)
60
+ run: |
61
+ export USERPROFILE="$(cygpath -w "$RUNNER_TEMP/e2e-home")" HOME="$RUNNER_TEMP/e2e-home"
62
+ mkdir -p "$HOME" && .venv/Scripts/python.exe scripts/e2e-hooks.py --service
59
63
  - name: Live daemon on Windows (start, decide, audit, stop)
60
64
  run: |
61
65
  export INTERLOCK_HOME="$RUNNER_TEMP/ih" IL=.venv/Scripts/interlock.exe
@@ -1,9 +1,11 @@
1
1
  name: release
2
2
 
3
- # Publish to PyPI when a version tag is pushed (git tag v0.1.0 && git push origin v0.1.0).
4
- # Uses PyPI trusted publishing: no API token is stored. One-time setup on pypi.org:
5
- # project "interlockd" → Publishing → add GitHub publisher: owner interlockd, repo interlock,
6
- # workflow release.yml, environment pypi.
3
+ # Publish to PyPI and npm when a version tag is pushed (git tag v0.1.0 && git push origin v0.1.0).
4
+ # Both use trusted publishing (OIDC): no API token is stored. One-time setup:
5
+ # pypi.org: project "interlockd" → Publishing → add GitHub publisher: owner interlockd, repo interlock,
6
+ # workflow release.yml, environment pypi.
7
+ # npmjs.com: package @interlockd/sdk → Settings → Trusted publishing → GitHub Actions: organization interlockd,
8
+ # repository interlock, workflow release.yml, environment npm.
7
9
 
8
10
  on:
9
11
  push:
@@ -27,8 +29,9 @@ jobs:
27
29
  tag="${GITHUB_REF_NAME#v}"
28
30
  pkg=$(python3 -c "import tomllib;print(tomllib.load(open('pyproject.toml','rb'))['project']['version'])")
29
31
  mod=$(python3 -c "import re;print(re.search(r'__version__ = \"(.+)\"', open('interlockd/__init__.py').read()).group(1))")
30
- echo "tag=$tag pyproject=$pkg module=$mod"
31
- [ "$tag" = "$pkg" ] && [ "$tag" = "$mod" ]
32
+ js=$(python3 -c "import json;print(json.load(open('sdk/js/package.json'))['version'])")
33
+ echo "tag=$tag pyproject=$pkg module=$mod sdk/js=$js"
34
+ [ "$tag" = "$pkg" ] && [ "$tag" = "$mod" ] && [ "$tag" = "$js" ]
32
35
  - name: Test
33
36
  run: |
34
37
  uv venv --python 3.12 && uv pip install -e ".[dev]" --python .venv/bin/python
@@ -66,6 +69,31 @@ jobs:
66
69
  gh release create "$GITHUB_REF_NAME" dist/* --repo "$GITHUB_REPOSITORY" --title "$GITHUB_REF_NAME" --generate-notes
67
70
  fi
68
71
 
72
+ npm:
73
+ # @interlockd/sdk (sdk/js) with npm trusted publishing: the job's OIDC identity is the credential (npm 11.5.1+), and
74
+ # npm attaches provenance (which commit and workflow built it) because the repository is public.
75
+ needs: publish
76
+ runs-on: ubuntu-latest
77
+ environment: npm
78
+ permissions:
79
+ contents: read
80
+ id-token: write # trusted publishing + provenance
81
+ steps:
82
+ - uses: actions/checkout@v7
83
+ - uses: actions/setup-node@v7
84
+ with: { node-version: "24", registry-url: "https://registry.npmjs.org" }
85
+ - name: npm with trusted publishing
86
+ run: npm install -g "npm@>=11.5.1" && npm --version
87
+ - name: Publish @interlockd/sdk
88
+ working-directory: sdk/js
89
+ run: |
90
+ v="${GITHUB_REF_NAME#v}"
91
+ [ "$(node -p 'require("./package.json").version')" = "$v" ] || { echo "::error::sdk/js version is not $v"; exit 1; }
92
+ if npm view "@interlockd/sdk@$v" version >/dev/null 2>&1; then
93
+ echo "@interlockd/sdk@$v is already on npm (published by hand?); nothing to do"; exit 0
94
+ fi
95
+ npm publish --access public --provenance
96
+
69
97
  homebrew:
70
98
  # Regenerates Formula/interlock.rb from the release on PyPI. With a HOMEBREW_TAP_TOKEN secret (a fine-grained token
71
99
  # with contents: write on interlockd/homebrew-tap) it commits the formula there; without one it is kept as an artifact.
@@ -218,3 +218,6 @@ __marimo__/
218
218
 
219
219
  # Streamlit
220
220
  .streamlit/secrets.toml
221
+
222
+ # exported shadow traffic (interlock corpus export): your own recorded calls, never committed
223
+ corpus/shadow/*.jsonl
@@ -1,5 +1,16 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.1.6 (2026-10-25)
4
+
5
+ - **Native Windows, agent hooks:** `interlock init` / `install` set up Claude Code, Codex, Cursor, Gemini CLI, Copilot CLI, Windsurf, Antigravity and Kiro on Windows with a Python hook shim (`interlockd/shims/py`): the same replies as the `sh` shim byte for byte (tested on every captured payload), about 60 ms per call, standard library only. The background service on Windows is a per-user Run-key entry (no admin rights). `selftest`, `capture` and `gateway` work on Windows too; only `sandbox` and `judge` still need macOS or Linux. CI runs `init` and every installed hook through `cmd.exe` / PowerShell on a Windows runner (`scripts/e2e-hooks.py`); live runs with each agent on Windows are still to do.
6
+ - The MCP gateway starts servers like `npx` on Windows (their `.cmd` launchers), and `capture export` redacts Windows home paths to `/Users/dev/...` like POSIX ones.
7
+ - Releases publish `@interlockd/sdk` to npm from the release workflow with npm trusted publishing (no stored token) and npm provenance; the release checks that the tag matches the JS SDK's version too.
8
+
9
+ ## 0.1.5 (2026-10-24)
10
+
11
+ - Plugin API: `interlockd.plugin_api` (version 1) is the stable interface for plugins (settings, policy validation, the managed policy, daemon status, hook integrity, audit records without tool content), covered by contract tests. A plugin can require a newer API with `PLUGIN_API = <n>`; an older interlockd skips it with a message. `interlock plugins` shows the API version.
12
+ - `examples/aws/interlock-audit.yaml`: a CloudFormation sample for the optional DynamoDB audit table (it keeps the table, and your audit records, if the stack is deleted); the user guide links it.
13
+
3
14
  ## 0.1.4 (2026-10-24)
4
15
 
5
16
  - Windsurf adapter verified live on Windsurf (Devin.app) 3.10.67: a refused force push, an injected README refused before Cascade read it, and a `cat` of it refused (`flow.reread_withheld`). Windsurf's read hooks carry no contents, so the daemon reads the file itself (256 KiB, never a sensitive path). Fixed live: Windsurf sends `cwd: null`, so a repository policy never applied; the hook's own directory is used now. Windsurf runs each hook twice; the repeat is answered from the first decision.
@@ -0,0 +1,30 @@
1
+ # Working on Interlock (for AI coding agents and their humans)
2
+
3
+ Interlock is a pre- and post-action gate for AI agents: a local daemon, a deterministic rule engine, hook adapters
4
+ for each agent, an MCP gateway, and Python/JS SDKs. Read `CONTRIBUTING.md` first; `docs/USER-GUIDE.md` is the full
5
+ reference and `docs/ADAPTERS.md` covers agent adapters.
6
+
7
+ ## Setup and checks (run all before you commit)
8
+
9
+ ```sh
10
+ uv venv --python 3.12 && uv pip install -e ".[dev]" --python .venv/bin/python
11
+ .venv/bin/ruff check .
12
+ .venv/bin/pytest -q
13
+ .venv/bin/interlock test # rule corpus gates
14
+ .venv/bin/interlock test --corpus corpus/archetypes # evaluation corpus
15
+ scripts/check-hygiene.sh # no real home paths, account ids or keys
16
+ ```
17
+
18
+ ## Rules
19
+
20
+ - **Sign off every commit** (`git commit -s`); work on a branch and open a PR to `main`. If several agents or sessions
21
+ work on this repo at once, give each its own `git worktree`; never switch branches in a checkout someone else uses.
22
+ - **Never touch the real environment while testing:** use a throwaway `HOME` and `INTERLOCK_HOME`, and a port other
23
+ than 7391. Don't edit your own agent configs (`~/.claude`, `~/.codex`, ...) or the running daemon.
24
+ - **A rule change needs positive and hard-negative cases** in `interlockd/data/packs/<pack>.jsonl`.
25
+ - **Adapters are verified live, never assumed:** record real payloads with `interlock capture`, export them redacted,
26
+ and replay them as fixtures. Don't write "verified" anywhere without a live run; say what is untested.
27
+ - **Cross-platform:** paths go through `interlockd/paths.py` (forward slashes, case-insensitive on macOS and Windows);
28
+ text files are read and written with `encoding="utf-8"` (a test enforces it).
29
+ - **Commit nothing that identifies a real machine, account or person:** redact home paths, user names, emails, tokens
30
+ and account ids in fixtures and docs. Security fixes go through a private advisory (`SECURITY.md`), not a public PR.
@@ -1,12 +1,13 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: interlockd
3
- Version: 0.1.4
3
+ Version: 0.1.6
4
4
  Summary: Interlock daemon: a pre/post-action interlock for coding agents
5
5
  License: Apache-2.0
6
6
  License-File: LICENSE
7
7
  License-File: NOTICE
8
8
  Classifier: Environment :: Console
9
9
  Classifier: Operating System :: MacOS
10
+ Classifier: Operating System :: Microsoft :: Windows
10
11
  Classifier: Operating System :: POSIX :: Linux
11
12
  Classifier: Programming Language :: Python :: 3.12
12
13
  Classifier: Topic :: Security
@@ -56,8 +57,9 @@ pipx install interlockd # or: uv tool install interlockd, or: brew install i
56
57
  interlock init # finds your agents, installs hooks, starts the daemon (shadow mode)
57
58
  ```
58
59
 
59
- Runs on macOS and Linux (Python 3.12+). On Windows, use it inside WSL2 and run your agents from the WSL terminal.
60
- Natively on Windows, the daemon and the Python and JavaScript SDKs work today (`interlock start`); agent hooks are next.
60
+ Runs on macOS, Linux and Windows (Python 3.12+). On Windows, `interlock init` installs the agent hooks natively (a
61
+ Python hook shim instead of `sh` + `curl`) and starts the daemon at sign-in; the OS sandbox and the local judge need
62
+ macOS or Linux (on Windows, WSL2).
61
63
 
62
64
  New here? [docs/GETTING-STARTED.md](docs/GETTING-STARTED.md) walks through shadow mode, enforcing, MCP servers, your own agents and CI in about ten minutes.
63
65
 
@@ -131,7 +133,7 @@ The full threat model is in [docs/THREAT-MODEL.md](docs/THREAT-MODEL.md). Latenc
131
133
 
132
134
  ```yaml
133
135
  - uses: actions/checkout@v7
134
- - uses: interlockd/interlock@v0.1.4 # scan MCP/agent configs, test .interlock/policy.yaml
136
+ - uses: interlockd/interlock@v0.1.6 # scan MCP/agent configs, test .interlock/policy.yaml
135
137
  with: { fail-on: high }
136
138
  - uses: github/codeql-action/upload-sarif@v3
137
139
  if: always()
@@ -12,8 +12,9 @@ pipx install interlockd # or: uv tool install interlockd, or: brew install i
12
12
  interlock init # finds your agents, installs hooks, starts the daemon (shadow mode)
13
13
  ```
14
14
 
15
- Runs on macOS and Linux (Python 3.12+). On Windows, use it inside WSL2 and run your agents from the WSL terminal.
16
- Natively on Windows, the daemon and the Python and JavaScript SDKs work today (`interlock start`); agent hooks are next.
15
+ Runs on macOS, Linux and Windows (Python 3.12+). On Windows, `interlock init` installs the agent hooks natively (a
16
+ Python hook shim instead of `sh` + `curl`) and starts the daemon at sign-in; the OS sandbox and the local judge need
17
+ macOS or Linux (on Windows, WSL2).
17
18
 
18
19
  New here? [docs/GETTING-STARTED.md](docs/GETTING-STARTED.md) walks through shadow mode, enforcing, MCP servers, your own agents and CI in about ten minutes.
19
20
 
@@ -87,7 +88,7 @@ The full threat model is in [docs/THREAT-MODEL.md](docs/THREAT-MODEL.md). Latenc
87
88
 
88
89
  ```yaml
89
90
  - uses: actions/checkout@v7
90
- - uses: interlockd/interlock@v0.1.4 # scan MCP/agent configs, test .interlock/policy.yaml
91
+ - uses: interlockd/interlock@v0.1.6 # scan MCP/agent configs, test .interlock/policy.yaml
91
92
  with: { fail-on: high }
92
93
  - uses: github/codeql-action/upload-sarif@v3
93
94
  if: always()
@@ -32,3 +32,6 @@ pip download interlockd==<version> --no-deps -d /tmp/il && gh attestation verify
32
32
  ```
33
33
 
34
34
  PyPI shows the same provenance on each file's page ("Verified details").
35
+
36
+ From 0.1.6, `@interlockd/sdk` is published to npm by the same workflow with npm trusted publishing, with npm
37
+ provenance (shown on its npm page). In a project that depends on it: `npm audit signatures`.
@@ -48,7 +48,9 @@ The daemon returns a `Verdict` with `disposition` in `allow | ask | block` (pre-
48
48
 
49
49
  ## 3. The shim
50
50
 
51
- Copy `interlockd/shims/claude-code/interlock-hook.sh` as a template. It must:
51
+ Copy `interlockd/shims/claude-code/interlock-hook.sh` as a template, and add the same behaviour to the Python shim
52
+ (`interlockd/shims/py/interlock-hook.py`, used on Windows); `tests/test_shim_py.py` requires the two to answer every
53
+ captured payload byte for byte alike. A shim must:
52
54
 
53
55
  - read the token from `~/.interlock/token` (exit 0 silently if missing: an uninstalled Interlock must never break the agent);
54
56
  - POST `{"adapter": {...}, "payload": <raw stdin>}` to `/interlock/v1/hooks/<harness>?format=<renderer>` with the bearer token and a short timeout (pre 1.5 s, post 2.5 s);
@@ -9,8 +9,8 @@ pipx install interlockd # or: uv tool install interlockd, or: brew instal
9
9
  interlock init
10
10
  ```
11
11
 
12
- macOS and Linux. On Windows, do everything here inside WSL2 (Ubuntu) and run your agents from the WSL terminal. (Natively on
13
- Windows, the daemon and the SDKs already work: see the user guide, §2.)
12
+ macOS, Linux and Windows. Everything here works the same on Windows (PowerShell or cmd), except the sandbox and the
13
+ local judge, which need macOS or Linux (on Windows, WSL2); see the user guide, §2.
14
14
 
15
15
  `init` lists everything it will change and asks first. It then:
16
16
 
@@ -35,7 +35,7 @@ A new install runs in **shadow** mode: every decision is computed and recorded,
35
35
 
36
36
  ## 2. Install and run
37
37
 
38
- Prerequisites: macOS or Linux, Python 3.12 or newer, `curl`, and at least one supported agent (§4). On Windows, install and run it inside WSL2 (Ubuntu), with your agents run from the WSL terminal. Natively on Windows, `interlock start` runs the daemon for the Python and JavaScript SDKs, with the same policy, audit log, `scan`, `report` and `test`; `init`, `install`, `gateway`, `sandbox`, `selftest`, `capture` and `judge` need macOS or Linux for now and say so. Windows-native agents (an IDE running on Windows itself) aren't covered yet. Linux: the background service is a systemd user service; `interlock sandbox` needs `bubblewrap`.
38
+ Prerequisites: macOS, Linux or Windows, Python 3.12 or newer, and at least one supported agent (§4); macOS and Linux also need `curl` (the hooks are `sh` + `curl`). **Windows:** everything works natively except `interlock sandbox` and `interlock judge` (use WSL2 for those). The hooks there are a Python shim (`interlockd/shims/py`, same replies as the `sh` shim, about 60 ms per call); Copilot CLI runs its Windows hooks through PowerShell, whose startup adds up to a couple of seconds per call. The background service is an entry in your user's Run key (`HKCU\Software\Microsoft\Windows\CurrentVersion\Run`, no admin rights) that starts the daemon at sign-in; unlike launchd and systemd it doesn't restart a crashed daemon, which `interlock doctor` reports. Hooks on Windows are tested by running each agent's installed hook command through `cmd.exe` / PowerShell with captured payloads in CI, not yet live with every agent on Windows. Linux: the background service is a systemd user service; `interlock sandbox` needs `bubblewrap`.
39
39
 
40
40
  ```sh
41
41
  pipx install interlockd # or: uv tool install interlockd
@@ -47,7 +47,7 @@ interlock log -f # watch decisions live
47
47
 
48
48
  - creates `~/.interlock/` with a per-install bearer token (mode 0600; hooks send it and the daemon requires it, even on loopback), the fail-mode table the hooks use when the daemon is down, and a commented starter policy in **shadow** mode;
49
49
  - adds Interlock's hooks to every supported agent it finds: user-level for Claude Code (`~/.claude/settings.json`), Codex (`~/.codex/hooks.json`), Cursor (`~/.cursor/hooks.json`), Gemini CLI (`~/.gemini/settings.json`), GitHub Copilot CLI (`~/.copilot/hooks/interlock.json`), Windsurf (`~/.codeium/windsurf/hooks.json`), and Antigravity CLI (`~/.gemini/config/hooks.json`), and the Kiro workspace you run it from (`.kiro/hooks/interlock.json`). Your existing hooks and settings are preserved;
50
- - installs and starts a background service: launchd on macOS, a systemd user unit on Linux, or a detached process elsewhere (`--backend`), logging to `~/.interlock/interlockd.log`;
50
+ - installs and starts a background service: launchd on macOS, a systemd user unit on Linux, the per-user Run key on Windows, or a detached process elsewhere (`--backend`), logging to `~/.interlock/interlockd.log`;
51
51
  - shows what the gate would decide for a few sample commands, without running them.
52
52
 
53
53
  Everything `init` changed is recorded in `~/.interlock/install-manifest.json`; `interlock uninstall` reverses exactly that (`--purge` also deletes `~/.interlock`). Options: `--harness claude-code,codex,cursor,gemini-cli,kiro` for a subset, `--enforce` to start enforcing, `--no-service` to run the daemon yourself with `interlock serve`, `--mcp` to also register the Interlock MCP server with each agent, `--gateway` to route MCP servers through the MCP gateway (§2.1).
@@ -128,7 +128,7 @@ Log: `~/.interlock/mcp-proxy.log`. Pins: `~/.interlock/mcp-pins.json`; after rev
128
128
  }
129
129
  ```
130
130
 
131
- `otlp_endpoint` (e.g. `http://localhost:4318/v1/traces`) and `otlp_headers` send one OpenTelemetry span per decision to your collector (OTLP/HTTP JSON, batched in the background; a session is one trace; attributes follow the GenAI conventions plus `interlock.*`; arguments and results are never exported). `interlock otel export --endpoint URL` backfills from the audit log. The daemon also serves the API on `~/.interlock/interlockd.sock`, created with mode 0600 so only your user can connect; the shell hooks prefer it over loopback TCP (`"unix_socket": false` turns it off; TCP stays for the HTTP MCP gateway and the Python clients). All keys are optional, and `init` writes none of them. Without `dynamodb_table` the daemon runs spool-only (fully functional; records stay in `~/.interlock/spool/`). Other keys: `listen`, `mode`, `agent_id`, `kiro_sessions_dir`, `user_messages_n`, `pre_timeout_ms`, `post_timeout_ms`.
131
+ `otlp_endpoint` (e.g. `http://localhost:4318/v1/traces`) and `otlp_headers` send one OpenTelemetry span per decision to your collector (OTLP/HTTP JSON, batched in the background; a session is one trace; attributes follow the GenAI conventions plus `interlock.*`; arguments and results are never exported). `interlock otel export --endpoint URL` backfills from the audit log. The daemon also serves the API on `~/.interlock/interlockd.sock`, created with mode 0600 so only your user can connect; the shell hooks prefer it over loopback TCP (`"unix_socket": false` turns it off; TCP stays for the HTTP MCP gateway and the Python clients). All keys are optional, and `init` writes none of them. Without `dynamodb_table` the daemon runs spool-only (fully functional; records stay in `~/.interlock/spool/`). To create the table, deploy [`examples/aws/interlock-audit.yaml`](../examples/aws/interlock-audit.yaml) with CloudFormation (it keeps the table if the stack is deleted). Other keys: `listen`, `mode`, `agent_id`, `kiro_sessions_dir`, `user_messages_n`, `pre_timeout_ms`, `post_timeout_ms`.
132
132
 
133
133
  ### CLI
134
134
 
@@ -623,6 +623,14 @@ they can't change a decision. A plugin that fails to load or raises is skipped w
623
623
  CLI or the daemon. `interlock plugins` lists what's installed; `INTERLOCK_PLUGINS=0` turns them all off. Install a
624
624
  plugin into Interlock's own environment, e.g. `pipx inject interlockd <package>`.
625
625
 
626
+ **Plugin API.** Besides the two hooks, a plugin should use only `interlockd.plugin_api`, the stable interface:
627
+ settings and the spool location, loading and validating policy, the managed (tighten-only) policy file, the daemon's
628
+ status, hook integrity, and audit records with tool arguments and results left out. Everything else in `interlockd`
629
+ is internal and can change in any release. Within one `plugin_api.API_VERSION`, names are only added; a breaking
630
+ change bumps the version and keeps the old behaviour, with a deprecation warning, for at least one minor release. A
631
+ plugin that needs a newer API sets `PLUGIN_API = <n>` in its module, and an older interlockd skips it with a message
632
+ to upgrade. `interlock plugins` prints the API version. `tests/test_plugin_api.py` is the contract.
633
+
626
634
  ## 7. Troubleshooting
627
635
 
628
636
  | Symptom | Cause | Fix |
@@ -0,0 +1,70 @@
1
+ AWSTemplateFormatVersion: "2010-09-09"
2
+ Description: >-
3
+ Interlock audit store (optional): one DynamoDB table for the daemon's audit records, on-demand, TTL on expires_at,
4
+ point-in-time recovery, a stream (NEW_IMAGE), three GSIs, encrypted with the AWS-managed DynamoDB key.
5
+ Deploy: aws cloudformation deploy --stack-name interlock-audit --template-file interlock-audit.yaml
6
+ then set "dynamodb_table": "interlock-audit" (and aws_region / aws_profile) in ~/.interlock/config.json.
7
+
8
+ Parameters:
9
+ TableName:
10
+ Type: String
11
+ Default: interlock-audit
12
+ Environment:
13
+ Type: String
14
+ Default: dev
15
+
16
+ Resources:
17
+ AuditTable:
18
+ Type: AWS::DynamoDB::Table
19
+ DeletionPolicy: Retain # deleting the stack keeps your audit records; delete the table yourself
20
+ UpdateReplacePolicy: Retain
21
+ Properties:
22
+ TableName: !Ref TableName
23
+ BillingMode: PAY_PER_REQUEST
24
+ DeletionProtectionEnabled: false
25
+ AttributeDefinitions:
26
+ - { AttributeName: PK, AttributeType: S }
27
+ - { AttributeName: SK, AttributeType: S }
28
+ - { AttributeName: session_id, AttributeType: S }
29
+ - { AttributeName: event_id, AttributeType: S }
30
+ - { AttributeName: GSI2PK, AttributeType: S }
31
+ - { AttributeName: GSI3PK, AttributeType: S }
32
+ KeySchema:
33
+ - { AttributeName: PK, KeyType: HASH }
34
+ - { AttributeName: SK, KeyType: RANGE }
35
+ GlobalSecondaryIndexes:
36
+ - IndexName: GSI1-session
37
+ KeySchema:
38
+ - { AttributeName: session_id, KeyType: HASH }
39
+ - { AttributeName: event_id, KeyType: RANGE }
40
+ Projection: { ProjectionType: ALL }
41
+ - IndexName: GSI2-workspace-time
42
+ KeySchema:
43
+ - { AttributeName: GSI2PK, KeyType: HASH }
44
+ - { AttributeName: event_id, KeyType: RANGE }
45
+ Projection: { ProjectionType: ALL }
46
+ - IndexName: GSI3-review
47
+ KeySchema:
48
+ - { AttributeName: GSI3PK, KeyType: HASH }
49
+ - { AttributeName: event_id, KeyType: RANGE }
50
+ Projection: { ProjectionType: ALL }
51
+ TimeToLiveSpecification: { AttributeName: expires_at, Enabled: true }
52
+ PointInTimeRecoverySpecification: { PointInTimeRecoveryEnabled: true }
53
+ StreamSpecification: { StreamViewType: NEW_IMAGE }
54
+ SSESpecification: { SSEEnabled: true, SSEType: KMS } # AWS-managed key alias/aws/dynamodb
55
+ Tags:
56
+ - { Key: Project, Value: interlock }
57
+ - { Key: Component, Value: audit-store }
58
+ - { Key: Environment, Value: !Ref Environment }
59
+ - { Key: ManagedBy, Value: cloudformation }
60
+
61
+ Outputs:
62
+ TableName:
63
+ Value: !Ref AuditTable
64
+ Export: { Name: !Sub "${AWS::StackName}-TableName" }
65
+ TableArn:
66
+ Value: !GetAtt AuditTable.Arn
67
+ Export: { Name: !Sub "${AWS::StackName}-TableArn" }
68
+ StreamArn:
69
+ Value: !GetAtt AuditTable.StreamArn
70
+ Export: { Name: !Sub "${AWS::StackName}-StreamArn" }
@@ -9,7 +9,7 @@ jobs:
9
9
  runs-on: ubuntu-latest
10
10
  steps:
11
11
  - uses: actions/checkout@v7
12
- - uses: interlockd/interlock@v0.1.4
12
+ - uses: interlockd/interlock@v0.1.6
13
13
  with: { fail-on: high }
14
14
  - uses: github/codeql-action/upload-sarif@v3
15
15
  if: always()
@@ -1,3 +1,3 @@
1
1
  """Interlock daemon package."""
2
2
 
3
- __version__ = "0.1.4"
3
+ __version__ = "0.1.6"
@@ -32,7 +32,7 @@ def _pct(xs: list[float]) -> dict[str, float]:
32
32
 
33
33
  def run(rounds: int = 3, http_calls: int = 300, shim_calls: int = 100) -> dict[str, dict]:
34
34
  from .api import ApiServer
35
- from .cli import CLAUDE_SHIM_SRC
35
+ from .cli import CLAUDE_SHIM_SRC, PY_SHIM_SRC, _hook_python, hook_runtime
36
36
  from .config import Settings
37
37
  from .models import AdapterInfo, Capabilities, Context, InterlockEvent, ToolCall, ToolResult
38
38
  from .pipeline import Daemon
@@ -81,7 +81,18 @@ def run(rounds: int = 3, http_calls: int = 300, shim_calls: int = 100) -> dict[s
81
81
  t0 = time.perf_counter(); urllib.request.urlopen(req, timeout=5).read(); t.append((time.perf_counter() - t0) * 1000)
82
82
  out["http"] = _pct(t)
83
83
 
84
- if shutil.which("curl"):
84
+ if hook_runtime() == "py": # the Python shim (native Windows), over TCP
85
+ shim = home / "shim.py"; shim.write_text(PY_SHIM_SRC.read_text(encoding="utf-8").replace("__HARNESS__", "claude-code"), encoding="utf-8")
86
+ env = {**os.environ, "INTERLOCK_HOME": str(home), "INTERLOCK_URL": f"http://{host}:{port}"}
87
+ t = []
88
+ for _ in range(shim_calls):
89
+ t0 = time.perf_counter()
90
+ subprocess.run([_hook_python(), "-I", "-S", str(shim)], input=json.dumps(payload), text=True, capture_output=True,
91
+ env=env, timeout=10, check=False)
92
+ t.append((time.perf_counter() - t0) * 1000)
93
+ if t:
94
+ out["shim (python)"] = _pct(t)
95
+ elif shutil.which("curl"):
85
96
  shim = home / "shim.sh"; shim.write_text(CLAUDE_SHIM_SRC.read_text(encoding="utf-8").replace("__HARNESS__", "claude-code"), encoding="utf-8")
86
97
  for label, extra in (("shim (tcp)", {"INTERLOCK_URL": f"http://{host}:{port}"}), ("shim (unix)", {})):
87
98
  env = {**{k: v for k, v in os.environ.items() if k != "INTERLOCK_URL"}, "INTERLOCK_HOME": str(home), **extra}
@@ -150,7 +150,10 @@ def redact(obj: Any, home: str | None = None, user: str | None = None) -> Any:
150
150
  user = user or getpass.getuser()
151
151
 
152
152
  def s(x: str) -> str:
153
- x = x.replace(home, "/Users/dev").replace(os.path.realpath(home), "/Users/dev")
153
+ for h in dict.fromkeys((home, os.path.realpath(home))):
154
+ if "\\" in h: # Windows: the rest of the path in forward slashes too, like the POSIX fixtures
155
+ x = re.sub(re.escape(h) + r"((?:\\[^\\\"'\s]*)*)", lambda m: "/Users/dev" + m.group(1).replace("\\", "/"), x)
156
+ x = x.replace(h, "/Users/dev")
154
157
  x = EMAIL.sub("dev@example.com", x)
155
158
  return re.sub(rf"\b{re.escape(user)}\b", "dev", x) if user else x
156
159