handcuff 0.2.2__tar.gz → 0.2.3__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 (74) hide show
  1. handcuff-0.2.3/01KX3HRHQKZHGVE0TWJV1SH6MX.json +118 -0
  2. handcuff-0.2.3/Dummy Agentic Project/agent_output.txt +1 -0
  3. {handcuff-0.2.2 → handcuff-0.2.3}/PKG-INFO +1 -1
  4. {handcuff-0.2.2 → handcuff-0.2.3}/handcuff/tui/app.py +2 -2
  5. {handcuff-0.2.2 → handcuff-0.2.3}/handcuff/tui/widgets/banner_header.py +7 -2
  6. {handcuff-0.2.2 → handcuff-0.2.3}/pyproject.toml +1 -1
  7. handcuff-0.2.2/Dummy Agentic Project/agent_output.txt +0 -1
  8. {handcuff-0.2.2 → handcuff-0.2.3}/.github/workflows/publish.yml +0 -0
  9. {handcuff-0.2.2 → handcuff-0.2.3}/.gitignore +0 -0
  10. {handcuff-0.2.2 → handcuff-0.2.3}/00_README_START_HERE.md +0 -0
  11. {handcuff-0.2.2 → handcuff-0.2.3}/Dummy Agentic Project/README.md +0 -0
  12. {handcuff-0.2.2 → handcuff-0.2.3}/Dummy Agentic Project/main.py +0 -0
  13. {handcuff-0.2.2 → handcuff-0.2.3}/Dummy Agentic Project/requirements.txt +0 -0
  14. {handcuff-0.2.2 → handcuff-0.2.3}/README.md +0 -0
  15. {handcuff-0.2.2 → handcuff-0.2.3}/handcuff/__init__.py +0 -0
  16. {handcuff-0.2.2 → handcuff-0.2.3}/handcuff/alerts/__init__.py +0 -0
  17. {handcuff-0.2.2 → handcuff-0.2.3}/handcuff/alerts/webhooks.py +0 -0
  18. {handcuff-0.2.2 → handcuff-0.2.3}/handcuff/banner.py +0 -0
  19. {handcuff-0.2.2 → handcuff-0.2.3}/handcuff/capture/__init__.py +0 -0
  20. {handcuff-0.2.2 → handcuff-0.2.3}/handcuff/capture/base.py +0 -0
  21. {handcuff-0.2.2 → handcuff-0.2.3}/handcuff/capture/file_watch.py +0 -0
  22. {handcuff-0.2.2 → handcuff-0.2.3}/handcuff/capture/net_watch.py +0 -0
  23. {handcuff-0.2.2 → handcuff-0.2.3}/handcuff/capture/psutil_backend.py +0 -0
  24. {handcuff-0.2.2 → handcuff-0.2.3}/handcuff/capture/redact.py +0 -0
  25. {handcuff-0.2.2 → handcuff-0.2.3}/handcuff/capture/tree.py +0 -0
  26. {handcuff-0.2.2 → handcuff-0.2.3}/handcuff/cli.py +0 -0
  27. {handcuff-0.2.2 → handcuff-0.2.3}/handcuff/config.py +0 -0
  28. {handcuff-0.2.2 → handcuff-0.2.3}/handcuff/core/__init__.py +0 -0
  29. {handcuff-0.2.2 → handcuff-0.2.3}/handcuff/core/bus.py +0 -0
  30. {handcuff-0.2.2 → handcuff-0.2.3}/handcuff/core/events.py +0 -0
  31. {handcuff-0.2.2 → handcuff-0.2.3}/handcuff/core/hashing.py +0 -0
  32. {handcuff-0.2.2 → handcuff-0.2.3}/handcuff/core/session.py +0 -0
  33. {handcuff-0.2.2 → handcuff-0.2.3}/handcuff/core/signing.py +0 -0
  34. {handcuff-0.2.2 → handcuff-0.2.3}/handcuff/doctor.py +0 -0
  35. {handcuff-0.2.2 → handcuff-0.2.3}/handcuff/enforce/__init__.py +0 -0
  36. {handcuff-0.2.2 → handcuff-0.2.3}/handcuff/enforce/file_acl.py +0 -0
  37. {handcuff-0.2.2 → handcuff-0.2.3}/handcuff/enforce/firewall.py +0 -0
  38. {handcuff-0.2.2 → handcuff-0.2.3}/handcuff/enforce/scan.py +0 -0
  39. {handcuff-0.2.2 → handcuff-0.2.3}/handcuff/export/__init__.py +0 -0
  40. {handcuff-0.2.2 → handcuff-0.2.3}/handcuff/export/html_export.py +0 -0
  41. {handcuff-0.2.2 → handcuff-0.2.3}/handcuff/export/json_export.py +0 -0
  42. {handcuff-0.2.2 → handcuff-0.2.3}/handcuff/export/md_export.py +0 -0
  43. {handcuff-0.2.2 → handcuff-0.2.3}/handcuff/gateway/__init__.py +0 -0
  44. {handcuff-0.2.2 → handcuff-0.2.3}/handcuff/gateway/gateway.py +0 -0
  45. {handcuff-0.2.2 → handcuff-0.2.3}/handcuff/gateway/log.py +0 -0
  46. {handcuff-0.2.2 → handcuff-0.2.3}/handcuff/gateway/policy.py +0 -0
  47. {handcuff-0.2.2 → handcuff-0.2.3}/handcuff/integrations/__init__.py +0 -0
  48. {handcuff-0.2.2 → handcuff-0.2.3}/handcuff/integrations/langchain.py +0 -0
  49. {handcuff-0.2.2 → handcuff-0.2.3}/handcuff/replay.py +0 -0
  50. {handcuff-0.2.2 → handcuff-0.2.3}/handcuff/rules/__init__.py +0 -0
  51. {handcuff-0.2.2 → handcuff-0.2.3}/handcuff/rules/defaults.yaml +0 -0
  52. {handcuff-0.2.2 → handcuff-0.2.3}/handcuff/rules/dsl.py +0 -0
  53. {handcuff-0.2.2 → handcuff-0.2.3}/handcuff/rules/engine.py +0 -0
  54. {handcuff-0.2.2 → handcuff-0.2.3}/handcuff/rules/injection.py +0 -0
  55. {handcuff-0.2.2 → handcuff-0.2.3}/handcuff/rules/trust.py +0 -0
  56. {handcuff-0.2.2 → handcuff-0.2.3}/handcuff/runner.py +0 -0
  57. {handcuff-0.2.2 → handcuff-0.2.3}/handcuff/storage/__init__.py +0 -0
  58. {handcuff-0.2.2 → handcuff-0.2.3}/handcuff/storage/db.py +0 -0
  59. {handcuff-0.2.2 → handcuff-0.2.3}/handcuff/storage/writer.py +0 -0
  60. {handcuff-0.2.2 → handcuff-0.2.3}/handcuff/tui/__init__.py +0 -0
  61. {handcuff-0.2.2 → handcuff-0.2.3}/handcuff/tui/risk.py +0 -0
  62. {handcuff-0.2.2 → handcuff-0.2.3}/handcuff/tui/styles.tcss +0 -0
  63. {handcuff-0.2.2 → handcuff-0.2.3}/handcuff/tui/theme.py +0 -0
  64. {handcuff-0.2.2 → handcuff-0.2.3}/handcuff/tui/widgets/__init__.py +0 -0
  65. {handcuff-0.2.2 → handcuff-0.2.3}/handcuff/tui/widgets/flag_cards.py +0 -0
  66. {handcuff-0.2.2 → handcuff-0.2.3}/handcuff/tui/widgets/footer.py +0 -0
  67. {handcuff-0.2.2 → handcuff-0.2.3}/handcuff/tui/widgets/hero.py +0 -0
  68. {handcuff-0.2.2 → handcuff-0.2.3}/handcuff/tui/widgets/logs.py +0 -0
  69. {handcuff-0.2.2 → handcuff-0.2.3}/handcuff/tui/widgets/monitoring.py +0 -0
  70. {handcuff-0.2.2 → handcuff-0.2.3}/handcuff/tui/widgets/recommendation.py +0 -0
  71. {handcuff-0.2.2 → handcuff-0.2.3}/handcuff/tui/widgets/risk_overview.py +0 -0
  72. {handcuff-0.2.2 → handcuff-0.2.3}/handcuff/tui/widgets/trust.py +0 -0
  73. {handcuff-0.2.2 → handcuff-0.2.3}/handcuff/verify.py +0 -0
  74. {handcuff-0.2.2 → handcuff-0.2.3}/scripts/build_windows.ps1 +0 -0
@@ -0,0 +1,118 @@
1
+ {
2
+ "session": {
3
+ "id": "01KX3HRHQKZHGVE0TWJV1SH6MX",
4
+ "label": null,
5
+ "target_cmd": "python main.py",
6
+ "root_pid": 40008,
7
+ "started_at": 1783604463347,
8
+ "ended_at": 1783604464847,
9
+ "status": "CLOSED"
10
+ },
11
+ "events": [
12
+ {
13
+ "seq": 0,
14
+ "ts": 1783604463387,
15
+ "kind": "PROCESS_SPAWN",
16
+ "pid": 40008,
17
+ "ppid": 40008,
18
+ "payload": {
19
+ "argv": [
20
+ "python",
21
+ "main.py"
22
+ ],
23
+ "cwd": "C:\\Users\\Varun\\Desktop\\Main\\Personal Learning\\Handcuff\\Dummy Agentic Project",
24
+ "exe": "C:\\Program Files\\Python310\\python.exe",
25
+ "user": "LAPTOP-3FU0HLB5\\Varun"
26
+ },
27
+ "prev_hash": "0000000000000000000000000000000000000000000000000000000000000000",
28
+ "hash": "047618168c7d6a803b7b76e778b6fd05135ad6c81e469cc00588221e9ad21e57"
29
+ },
30
+ {
31
+ "seq": 1,
32
+ "ts": 1783604464262,
33
+ "kind": "NET_CONNECT",
34
+ "pid": 40008,
35
+ "ppid": null,
36
+ "payload": {
37
+ "bytes": 0,
38
+ "domain": "pt-in-f153.1e100.net",
39
+ "dst_ip": "2404:6800:4000:100c::99",
40
+ "port": 443,
41
+ "proto": "tcp"
42
+ },
43
+ "prev_hash": "047618168c7d6a803b7b76e778b6fd05135ad6c81e469cc00588221e9ad21e57",
44
+ "hash": "ed20e99732dc71fbe7128414b9b66d0de07dcc5c3abaf20dbee7f7d394fe1718"
45
+ },
46
+ {
47
+ "seq": 2,
48
+ "ts": 1783604464262,
49
+ "kind": "ALERT",
50
+ "pid": null,
51
+ "ppid": null,
52
+ "payload": {
53
+ "message": "Connection to new domain",
54
+ "rule_id": "unknown_domain",
55
+ "severity": "warn"
56
+ },
57
+ "prev_hash": "ed20e99732dc71fbe7128414b9b66d0de07dcc5c3abaf20dbee7f7d394fe1718",
58
+ "hash": "ae82f1646e5391bc13d7bd49fd00bae8096cf2fa29368f566c79a17cea7cd89e"
59
+ },
60
+ {
61
+ "seq": 3,
62
+ "ts": 1783604464305,
63
+ "kind": "FILE_WRITE",
64
+ "pid": null,
65
+ "ppid": null,
66
+ "payload": {
67
+ "bytes_delta": 46,
68
+ "op": "modify",
69
+ "path": "C:\\Users\\Varun\\Desktop\\Main\\Personal Learning\\Handcuff\\Dummy Agentic Project\\agent_output.txt"
70
+ },
71
+ "prev_hash": "ae82f1646e5391bc13d7bd49fd00bae8096cf2fa29368f566c79a17cea7cd89e",
72
+ "hash": "75f7802b56da702651385cfc59f44ba547ecfdce2b9508cb90ec7ed8b81153ff"
73
+ },
74
+ {
75
+ "seq": 4,
76
+ "ts": 1783604464305,
77
+ "kind": "FILE_WRITE",
78
+ "pid": null,
79
+ "ppid": null,
80
+ "payload": {
81
+ "bytes_delta": 46,
82
+ "op": "modify",
83
+ "path": "C:\\Users\\Varun\\Desktop\\Main\\Personal Learning\\Handcuff\\Dummy Agentic Project\\agent_output.txt"
84
+ },
85
+ "prev_hash": "75f7802b56da702651385cfc59f44ba547ecfdce2b9508cb90ec7ed8b81153ff",
86
+ "hash": "8b4f21a0f221a029643d1e516be579103205ae3f5e4cd08ddeb71f9b86333bb1"
87
+ },
88
+ {
89
+ "seq": 5,
90
+ "ts": 1783604464472,
91
+ "kind": "PROCESS_EXIT",
92
+ "pid": 40008,
93
+ "ppid": 40008,
94
+ "payload": {
95
+ "duration_ms": 1085,
96
+ "exit_code": null
97
+ },
98
+ "prev_hash": "8b4f21a0f221a029643d1e516be579103205ae3f5e4cd08ddeb71f9b86333bb1",
99
+ "hash": "7227928e46db3fc85b92f642df1e8f255033769d4949a2bbe99baab11ded5924"
100
+ }
101
+ ],
102
+ "alerts": [
103
+ {
104
+ "seq": 1,
105
+ "rule_id": "unknown_domain",
106
+ "severity": "warn",
107
+ "message": "Connection to new domain",
108
+ "muted": false,
109
+ "ts": 1783604464262
110
+ }
111
+ ],
112
+ "checkpoints": [],
113
+ "verification": {
114
+ "head_hash": "7227928e46db3fc85b92f642df1e8f255033769d4949a2bbe99baab11ded5924",
115
+ "pubkey": "7cf9d095c6d73e03e4c6dbba67b5905f9787a9705eb85068b46899642e4a8f9f",
116
+ "signature": "c4f1fd20bc4716fe00e47a24ded6bf86f2123a7a8b889b5d25c076917bbd87eec92221a85694761eadca19bd5a013f5e857e174485539bfc70e0847821ac4102"
117
+ }
118
+ }
@@ -0,0 +1 @@
1
+ What do you call a pile of cats? - A Meowtain.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: handcuff
3
- Version: 0.2.2
3
+ Version: 0.2.3
4
4
  Summary: A dashcam for your AI agents: local, tamper-evident recorder for process/file/network activity, with a LangChain/LangGraph drop-in prompt-injection circuit breaker.
5
5
  Project-URL: Homepage, https://github.com/Mister2005/Handcuff
6
6
  Project-URL: Repository, https://github.com/Mister2005/Handcuff
@@ -228,7 +228,7 @@ class HandcuffApp(App):
228
228
  )
229
229
 
230
230
  session = conn.execute(
231
- "SELECT target_cmd, root_pid, status, started_at FROM sessions WHERE id = ?",
231
+ "SELECT target_cmd, root_pid, status, started_at, ended_at FROM sessions WHERE id = ?",
232
232
  (self.session_id,),
233
233
  ).fetchone()
234
234
  conn.close()
@@ -242,7 +242,7 @@ class HandcuffApp(App):
242
242
  status=session["status"],
243
243
  )
244
244
  self.query_one("#session-info", SessionInfoBox).set_session(
245
- self.session_id, session["status"], session["started_at"]
245
+ self.session_id, session["status"], session["started_at"], session["ended_at"]
246
246
  )
247
247
 
248
248
 
@@ -57,15 +57,17 @@ class SessionInfoBox(Static):
57
57
  self.session_id = "-"
58
58
  self.status = "-"
59
59
  self.started_at_ms: int | None = None
60
+ self.ended_at_ms: int | None = None
60
61
 
61
62
  def on_mount(self) -> None:
62
63
  self._redraw()
63
64
  self.set_interval(1.0, self._redraw)
64
65
 
65
- def set_session(self, session_id: str, status: str, started_at_ms: int | None) -> None:
66
+ def set_session(self, session_id: str, status: str, started_at_ms: int | None, ended_at_ms: int | None = None) -> None:
66
67
  self.session_id = session_id
67
68
  self.status = status
68
69
  self.started_at_ms = started_at_ms
70
+ self.ended_at_ms = ended_at_ms
69
71
  self._redraw()
70
72
 
71
73
  def _redraw(self) -> None:
@@ -74,7 +76,10 @@ class SessionInfoBox(Static):
74
76
  if self.started_at_ms is not None:
75
77
  started_dt = datetime.fromtimestamp(self.started_at_ms / 1000, tz=timezone.utc)
76
78
  started_str = started_dt.strftime("%Y-%m-%d %H:%M:%S")
77
- elapsed = max(0, int(time.time() - self.started_at_ms / 1000))
79
+ if self.ended_at_ms is not None:
80
+ elapsed = max(0, int((self.ended_at_ms - self.started_at_ms) / 1000))
81
+ else:
82
+ elapsed = max(0, int(time.time() - self.started_at_ms / 1000))
78
83
  h, rem = divmod(elapsed, 3600)
79
84
  m, s = divmod(rem, 60)
80
85
  uptime_str = f"{h:02d}:{m:02d}:{s:02d}"
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "handcuff"
3
- version = "0.2.2"
3
+ version = "0.2.3"
4
4
  description = "A dashcam for your AI agents: local, tamper-evident recorder for process/file/network activity, with a LangChain/LangGraph drop-in prompt-injection circuit breaker."
5
5
  readme = "00_README_START_HERE.md"
6
6
  requires-python = ">=3.10"
@@ -1 +0,0 @@
1
- Why do pumpkins sit on people’s porches? - They have no hands to knock on the door.
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes