htmlgraph 0.26.2__py3-none-any.whl → 0.26.3__py3-none-any.whl

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.
htmlgraph/__init__.py CHANGED
@@ -95,7 +95,7 @@ from htmlgraph.types import (
95
95
  )
96
96
  from htmlgraph.work_type_utils import infer_work_type, infer_work_type_from_id
97
97
 
98
- __version__ = "0.26.2"
98
+ __version__ = "0.26.3"
99
99
  __all__ = [
100
100
  # Exceptions
101
101
  "HtmlGraphError",
@@ -121,9 +121,10 @@ class HookContext:
121
121
  or os.environ.get("CLAUDE_SESSION_ID")
122
122
  )
123
123
 
124
- # Fallback: Query database for most recent active session
124
+ # Fallback: Query database for session with most recent UserQuery event
125
125
  # This solves the issue where PostToolUse hooks don't receive session_id
126
- # in hook_input, but SessionStart hook already created a session in the database.
126
+ # in hook_input. UserPromptSubmit hooks DO receive it and create UserQuery
127
+ # events with the correct session_id, so we use that as the source of truth.
127
128
  if not session_id:
128
129
  db_path = graph_dir / "htmlgraph.db"
129
130
  if db_path.exists():
@@ -133,9 +134,9 @@ class HookContext:
133
134
  conn = sqlite3.connect(str(db_path), timeout=1.0)
134
135
  cursor = conn.cursor()
135
136
  cursor.execute("""
136
- SELECT session_id FROM sessions
137
- WHERE status = 'active'
138
- ORDER BY created_at DESC
137
+ SELECT session_id FROM agent_events
138
+ WHERE tool_name = 'UserQuery'
139
+ ORDER BY timestamp DESC
139
140
  LIMIT 1
140
141
  """)
141
142
  row = cursor.fetchone()
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: htmlgraph
3
- Version: 0.26.2
3
+ Version: 0.26.3
4
4
  Summary: HTML is All You Need - Graph database on web standards
5
5
  Project-URL: Homepage, https://github.com/Shakes-tzd/htmlgraph
6
6
  Project-URL: Documentation, https://github.com/Shakes-tzd/htmlgraph#readme
@@ -1,4 +1,4 @@
1
- htmlgraph/__init__.py,sha256=2QaxMFduHIDK32CD8WRDlR_dOQSHvcNIF112-15GMvs,5717
1
+ htmlgraph/__init__.py,sha256=y5XtfLHF0tmaAmvfb8-leetdd0Y4gElpVeFT1UWB0yU,5717
2
2
  htmlgraph/agent_detection.py,sha256=wEmrDv4hssPX2OkEnJZBHPbalxcaloiJF_hOOow_5WE,3511
3
3
  htmlgraph/agent_registry.py,sha256=Usa_35by7p5gtpvHO7K3AcGimnorw-FzgPVa3cWTQ58,9448
4
4
  htmlgraph/agents.py,sha256=Yvu6x1nOfrW2WhRTAHiCuSpvqoVJXx1Mkzd59kwEczw,33466
@@ -169,7 +169,7 @@ htmlgraph/hooks/__init__.py,sha256=FxVdnSYMNTjaKyOJ-euvyq9qYy5LZvGH5eIRqw0SpyQ,1
169
169
  htmlgraph/hooks/bootstrap.py,sha256=IiahOTOZolhIHF-yDfolmfT2kR5_EH_E9A7BBFKy2lI,5194
170
170
  htmlgraph/hooks/cigs_pretool_enforcer.py,sha256=Lyp4DDaw_sVHEcW-kzdegldyfXjvVD25zRGamq0v-sU,12722
171
171
  htmlgraph/hooks/concurrent_sessions.py,sha256=qOiwDfynphVG0-2pVBakEzOwMORU8ebN1gMjcN4S0z0,6476
172
- htmlgraph/hooks/context.py,sha256=gVp5Z2WPF0aydxUwMhTqVW4RSnyQCkOZF7YlZo7GR4g,13007
172
+ htmlgraph/hooks/context.py,sha256=tJ4dIL8uTFHyqyuuMc-ETDuOikeD5cN3Mdjmfg6W0HE,13108
173
173
  htmlgraph/hooks/drift_handler.py,sha256=QckL5U5ooku51kI6mppGLsXzaKVt1Yx5uNu-iXZrgSk,17602
174
174
  htmlgraph/hooks/event_tracker.py,sha256=HhgIc2664ZeZM6YSB_0Ybp3fsEEFcKAUa7nTff1dQV0,40114
175
175
  htmlgraph/hooks/hooks-config.example.json,sha256=tXpk-U-FZzGOoNJK2uiDMbIHCYEHA794J-El0fBwkqg,197
@@ -215,12 +215,12 @@ htmlgraph/templates/AGENTS.md.template,sha256=f96h7V6ygwj-v-fanVI48eYMxR6t_se4be
215
215
  htmlgraph/templates/CLAUDE.md.template,sha256=h1kG2hTX2XYig2KszsHBfzrwa_4Cfcq2Pj4SwqzeDlM,1984
216
216
  htmlgraph/templates/GEMINI.md.template,sha256=gAGzE53Avki87BM_otqy5HdcYCoLsHgqaKjVzNzPMX8,1622
217
217
  htmlgraph/templates/orchestration-view.html,sha256=DlS7LlcjH0oO_KYILjuF1X42t8QhKLH4F85rkO54alY,10472
218
- htmlgraph-0.26.2.data/data/htmlgraph/dashboard.html,sha256=Y0w6qoXEPVmWETxi-_GwBNiWlCMP1Ur0OD5EL5uH7P4,30027
219
- htmlgraph-0.26.2.data/data/htmlgraph/styles.css,sha256=oDUSC8jG-V-hKojOBO9J88hxAeY2wJrBYTq0uCwX_Y4,7135
220
- htmlgraph-0.26.2.data/data/htmlgraph/templates/AGENTS.md.template,sha256=f96h7V6ygwj-v-fanVI48eYMxR6t_se4bet1H4ZsDpI,7642
221
- htmlgraph-0.26.2.data/data/htmlgraph/templates/CLAUDE.md.template,sha256=h1kG2hTX2XYig2KszsHBfzrwa_4Cfcq2Pj4SwqzeDlM,1984
222
- htmlgraph-0.26.2.data/data/htmlgraph/templates/GEMINI.md.template,sha256=gAGzE53Avki87BM_otqy5HdcYCoLsHgqaKjVzNzPMX8,1622
223
- htmlgraph-0.26.2.dist-info/METADATA,sha256=i5DpxNOgWHQh8zljGDj45LkcwjxrD_wU2hhEzbHOZNQ,10236
224
- htmlgraph-0.26.2.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
225
- htmlgraph-0.26.2.dist-info/entry_points.txt,sha256=EaUbjA_bbDwEO_XDLEGMeK8aQP-ZnHiUTkLshyKDyB8,98
226
- htmlgraph-0.26.2.dist-info/RECORD,,
218
+ htmlgraph-0.26.3.data/data/htmlgraph/dashboard.html,sha256=Y0w6qoXEPVmWETxi-_GwBNiWlCMP1Ur0OD5EL5uH7P4,30027
219
+ htmlgraph-0.26.3.data/data/htmlgraph/styles.css,sha256=oDUSC8jG-V-hKojOBO9J88hxAeY2wJrBYTq0uCwX_Y4,7135
220
+ htmlgraph-0.26.3.data/data/htmlgraph/templates/AGENTS.md.template,sha256=f96h7V6ygwj-v-fanVI48eYMxR6t_se4bet1H4ZsDpI,7642
221
+ htmlgraph-0.26.3.data/data/htmlgraph/templates/CLAUDE.md.template,sha256=h1kG2hTX2XYig2KszsHBfzrwa_4Cfcq2Pj4SwqzeDlM,1984
222
+ htmlgraph-0.26.3.data/data/htmlgraph/templates/GEMINI.md.template,sha256=gAGzE53Avki87BM_otqy5HdcYCoLsHgqaKjVzNzPMX8,1622
223
+ htmlgraph-0.26.3.dist-info/METADATA,sha256=vZ2qgRsgghHxlellT6Sh40XBd4qt9vvaQzBwPNMp8e0,10236
224
+ htmlgraph-0.26.3.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
225
+ htmlgraph-0.26.3.dist-info/entry_points.txt,sha256=EaUbjA_bbDwEO_XDLEGMeK8aQP-ZnHiUTkLshyKDyB8,98
226
+ htmlgraph-0.26.3.dist-info/RECORD,,